Ledger
The Ledger API, given an end user's accountId, will give you a complete view of only the account's fulfilled trades
Note, only accountId's that are created under your organization will be accessible.
#
API detailsURL : /v1/ledger/<accountId>
Method : GET
Auth required : Yes (API key and secret are required)
Permissions required : None
#
Success ResponseCode : 200 OK
Sample response return:
[ { "orderId": "12345", "fulfilled_datetime": "2021-11-12 13:21:01 GMT-06:00", "buy_or_sell": "BUY", "trade_status": "FULFILLED", "order_type": "LIMIT", "limit_order_max_price": 4010.00, "crypto_ticker": "ETH", "amount": 0.023 }, { "orderId": "56352", "fulfilled_datetime": "2021-11-12 19:01:01 GMT-06:00", "buy_or_sell": "SELL", "trade_status": "FULFILLED", "order_type": "MARKET", "crypto_ticker": "BTC", "amount": 0.002 }, { "orderId": "41411", "fulfilled_datetime": "2021-11-12 15:22:43 GMT-06:00", "buy_or_sell": "SELL", "trade_status": "FULFILLED", "order_type": "LIMIT", "limit_order_max_price": 70000.00, "crypto_ticker": "BTC", "amount": 0.002 }]
- accountId - String. The accountId of the returned account
- currency - String. The currency of the cash account
- account_trade_status - Enum. Enum that denotes the status of the account. Possible responses: LIVE
, BLOCKED
, UNDER_REVIEW
- account_blocked - Boolean. Boolean that represents if the account is blocked or not. TRUE
if account is blocked and not able to trade or withdraw, FALSE
if account is not blocked
- account_trades - Array. An array of all fulfilled account trades (buy and sell orders)
#
Error ResponseCode : 400 BAD REQUEST
Condition : If accountId is invalid or if organization does not have access to this account.