Order Book

List all historical trades

/v3/trade/history

1 credit per API call.

List all historical trades. It is possible to list all trades, trades for specific trading pair and/or account.

post/v3/trade/history

Request

  • Base URL
    https://api.tatum.io
  • URL
    https://api.tatum.io/v3/trade/history
  • Auth
    API key in header x-api-key

Request body

idstring

Account ID. If present, only closed trades for given account will be present.

customerIdstring

Customer ID. If present, only closed trades for given customer will be present.

pageSizenumber required

Max number of items per page is 50.

offsetnumber

Offset to obtain next page of the data.

pairstring

Trade pair. If present, list historical trades for that pair.

countboolean

Get the total trade pair count based on the filter. Either count or pageSize is accepted.

typesstring[]

Trade types.

sortstring[]

Sorts the result by selected property. The priority of the items is determined by order of the sort properties in array.

Example request

{
  "id": "5e68c66581f2ee32bc354087",
  "customerId": "5e68c66581f2ee32bc354087",
  "pageSize": 10,
  "pair": "BTC/EUR",
  "count": true,
  "types": [
    "BUY"
  ],
  "amount": [
    {
      "op": "gte",
      "value": "1.5"
    }
  ],
  "fill": [
    {
      "op": "gte",
      "value": "1.5"
    }
  ],
  "price": [
    {
      "op": "gte",
      "value": "1.5"
    }
  ],
  "created": [
    {
      "op": "gte",
      "value": "1.5"
    }
  ],
  "sort": [
    "PRICE_ASC"
  ]
}

Response

OK

idstring

ID of the trade

type'BUY' | 'SELL'

Type of the trade, BUY or SELL

pricestring

Price to buy / sell

amountstring

Amount of the trade to be bought / sold

pairstring

Trading pair

isMakerboolean

If closed trade was Maker or Taker trade

fillstring

How much of the trade was already filled.

feeAccountIdstring

ID of the account where fee will be paid, if any. If trade is a BUY or FUTURE_BUY type, feeAccountId must have same currency as a currency of currency2AccountId, and vice versa if trade is a SELL or FUTURE_SELL type, feeAccountId must have same currency as a currency of currency1AccountId.

feenumber

Percentage of the trade amount to be paid as a fee.

currency1AccountIdstring

ID of the account of the currenc 1 trade currency

currency2AccountIdstring

ID of the account of the currenc 2 trade currency

creatednumber

Creation date, UTC millis

Example response

[
  {
    "id": "7c21ed165e294db78b95f0f1",
    "type": "BUY",
    "price": "8650.4",
    "amount": "15000",
    "pair": "BTC/EUR",
    "isMaker": true,
    "fill": "1500",
    "feeAccountId": "7c21ed165e294db78b95f0f1",
    "fee": 1.5,
    "currency1AccountId": "7c21ed165e294db78b95f0f1",
    "currency2AccountId": "7c21ed165e294db78b95f0f1",
    "created": 1585170363103,
    "attr": {
      "sealDate": 1572031674384,
      "percentBlock": 1.5,
      "percentPenalty": 1.5
    }
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.