Trades

Get Trades (cursor pagination)

GET
/trades/cursor

Authorization

appToken read
AuthorizationBearer <token>

App access token issued by POST /tokens (client credentials). Full-access Apps hold the read and write scopes, read-only Apps hold read only. Send it as Authorization: Bearer <token>.

In: header

Scope: read

Query Parameters

cursor?string

Value of meta.next_cursor from the previous page. Omit for the first page.

Formatuuid
per_page?integer
Default10
include_count?boolean

When true, meta.total_count holds the number of trades matching the filters

Defaultfalse
sort_by?string

Sort column (default tradeId). Ties are always broken by tradeId. For referralsByDepth trades without a level are placed last for asc and first for desc.

Value in

  • "accountId"
  • "accountIdentifier"
  • "createTime"
  • "paymentCount"
  • "platformGroupName"
  • "platformId"
  • "price"
  • "profit"
  • "tradeIdentifier"
  • "symbolName"
  • "tradePosition"
  • "tradePositionId"
  • "tradePositionLifetime"
  • "tradeSide"
  • "tradeTime"
  • "volume"
  • "referralsByDepth"
  • "reversal"
sort_order?string
Default"asc"

Value in

  • "asc"
  • "desc"
include_client_type?boolean

When true and filter[userId] holds a single partner id, include referralsByDepth (trade owner level in that partner's chain)

Defaultfalse
include_reward_amount?boolean

When true and filter[userId] holds a single partner id, include rewardAmounts (processed rewards credited to that partner per trade, grouped by currency)

Defaultfalse

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/trades/cursor"
{  "trades": [    {      "tradeId": "string",      "tradeIdentifier": "string",      "tradeTime": "2019-08-24T14:15:22Z",      "paymentCount": 0,      "rewardAmounts": [        {          "amount": "string",          "currencyCode": "string",          "currencyPrecision": 0        }      ],      "payments": [        {          "paymentId": "string",          "paymentState": "string",          "paymentAmount": "string",          "paymentCurrencyCode": "string",          "paymentCurrencyPrecision": 0,          "paymentFormulaUnitPrecision": 0,          "paymentParentId": "string",          "paymentPreferencesGroupId": "string"        }      ],      "createTime": "2019-08-24T14:15:22Z",      "updateTime": "2019-08-24T14:15:22Z"    }  ],  "meta": {    "next_cursor": "a7ec8888-a9c3-4732-a281-9a08510f220b",    "has_more": true,    "total_count": 0  }}
{  "message": "string",  "code": "string",  "errors": {    "property1": [      "string"    ],    "property2": [      "string"    ]  },  "details": [    {      "field": "string",      "issue": "string"    }  ]}
{  "message": "string",  "code": "string",  "errors": {    "property1": [      "string"    ],    "property2": [      "string"    ]  },  "details": [    {      "field": "string",      "issue": "string"    }  ]}
{  "message": "string",  "code": "string",  "errors": {    "property1": [      "string"    ],    "property2": [      "string"    ]  },  "details": [    {      "field": "string",      "issue": "string"    }  ]}
{  "message": "string",  "code": "string",  "errors": {    "property1": [      "string"    ],    "property2": [      "string"    ]  },  "details": [    {      "field": "string",      "issue": "string"    }  ]}