---
title: "Get trades"
method: GET
path: "/trades"
tags: ["Trades"]
---

# Get trades

`GET /trades`

This endpoint retrieves past trades on the exchange split up by order. This is a paginated endpoint. For example, if a trade fills more than one order at once, it will show up as two entries for the bettor. If `bettor` is not provided, results are limited to trades placed within the last 12 months.

## Query parameters

- `startDate` integer
- `endDate` integer
- `bettor` string
- `settled` boolean
- `marketHashes` string[]
- `baseToken` string
- `maker` boolean
- `affiliate` string
- `pageSize` integer
- `paginationKey` string
- `tradeStatus` string
- `sportXeventId` string

## Response `200`

- object
  - `status` string — `success` or `failure` if the request succeeded or not
  - `data` object
    - `trades` Trade[]
      - `baseToken` string — The token in which this trade was placed
      - `bettor` string — The address of the bettor who placed the trade
      - `stake` string — Exact token amount that was staked for the bet. To convert into a readable token amount, see the token conversion section
      - `normalizedStake` number — The `stake` value in the correct decimal format for the `baseToken`
      - `odds` string — Implied odds that the bettor received for this bet. Divide by 10^20 to get the odds in decimal format.
      - `orderHash` string — The unique identifier of the order that was filled for this trade
      - `marketHash` string — The unique identifier of the market for which this trade was placed
      - `maker` boolean — `true` if the bettor is market maker in this trade
      - `bettingOutcomeOne` boolean — `true` if the bettor is betting outcome one in the market
      - `settled` boolean — `true` if this bet is settled (this refers to if the bet was won lost or voided, not if the trade succeeded or not)
      - `betTimeValue` number — The stake value in a human-readable decimal format
      - `settleValue` number — The settled payout value. `0` when unsettled.
      - `fillHash` string — The unique identifier for this trade
      - `tradeStatus` string — `SUCCESS` or `FAILED` depending on if this trade succeeded or not
      - `valid` boolean — `true` if the trade counts toward competitions or tournaments
      - `betType` integer — The type of bet. `0` for straight bets.
      - `affiliate` string — The affiliate address associated with this trade
      - `providerEventId` string — The provider's event ID for this trade
      - `settleDate` string — ISO formatted date string of when the trade was settled. Only present on settled trades.
      - `outcome` number — `0`, `1`, or `2` depending on the final outcome of the market. Only present on settled trades.
      - `contractsVersion` string — The version of the smart contracts used for this trade
      - `settleTxHash` string — The transaction hash of the settlement. Only present on settled trades.
      - `fillOrderHash` string — The hash of the fill order transaction
      - `fillOrderHashAttempts` string[] — All transaction hash attempts for filling this order
      - `lastMineAttemptTime` string — ISO formatted date string of the last time the transaction was attempted to be mined
      - `beneficiaryType` integer — The type of beneficiary for this trade
      - `targetNonce` integer — The nonce targeted for the fill transaction
      - `createdAt` string — ISO formatted date string of when this trade record was created
      - `updatedAt` string — ISO formatted date string of when this trade record was last updated
      - `chainVersion` string — `SXN` or `SXR`. See migration docs.
      - `sportXeventId` string — The event related to this trade
      - `netReturn` string — The net return amount in the `baseToken` value
      - `settleNetReturnValue` number — The net return amount in USD (at the time of settlement). Only present on settled trades.
      - `marketHasRefunds` boolean — `true` if capital-efficient refunds exist for this trade's market group; if `true`, query [Get portfolio refunds](/api-reference/get-trades-refunds) for details
      - `betTime` number — The time when the trade was placed. Returned as a UNIX timestamp (number) on `/trades`, or as an ISO date string on `/trades/orders`.
      - `isQuarterLineLeg` boolean — Always present. `true` when this trade's `marketHash` is one of the two legs of a quarter-line market; `false` otherwise.
      - `quarterLineParentMarketHash` string — Only present when `isQuarterLineLeg` is `true`. Holds the parent quarter-line market hash — i.e. the market the user originally placed on — which is different from the trade's own `marketHash`.
    - `nextKey` string — Pagination key to pass as `paginationKey` to retrieve the next page of results. Absent if no more results.
    - `pageSize` number — Maximum amount of records on this page. Will be equal to the `pageSize` passed in.

---

[API](https://skmtc.net/sx/apis/sx-bet-api.md) · [All operations](https://skmtc.net/sx/apis/sx-bet-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sx/sx-bet-api/versions/eb2c05c3a98e/schema)
