One Trading API
REST APIWebSocket API
REST APIWebSocket API
  1. Trading
  • Public
    • Currencies
      GET
    • Instruments
      GET
    • Candlesticks
      GET
    • Fee Groups
      GET
    • Order Book
      GET
    • Market Ticker
      GET
    • Market Ticker For Instrument
      GET
    • Time
      GET
  • Trading
    • Balances
      GET
    • Fees
      GET
    • Get Orders
      GET
    • Create Order
      POST
    • Get Order by Order ID
      GET
    • Get Order by Client ID
      GET
    • Cancel All Orders
      DELETE
    • Cancel Order by Order ID
      DELETE
    • Cancel Order by Client ID
      DELETE
    • Get Trades for Order
      GET
    • Get Trades
      GET
    • Get Trade by Trade ID
      GET
  • Futures
    • Introduction
    • Funding Rate Methodology
    • Current Funding Rate
      GET
    • Funding Rate History
      GET
    • Futures Portfolio Summary
      GET
    • Get Futures Open Positions
      GET
  1. Trading

Get Trades

GET
https://api.onetrading.com/fast/v1/account/trades
Returns a paginated list of trades.
By default, if no params are provided, will return all open orders.
If with_cancelled_and_rejected and/or with_just_filled_inactive is set to true the default lookback is 1 day.
A from and a to date can be provided. The maximum window size is 30 days. If more than a 30 day window is provided, you will receive an 400 error.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.onetrading.com/fast/v1/account/trades?from&to&instrument_code&max_page_size&cursor'
Response Response Example
200 - Success
{
  "trade_history": [
    {
      "fee": {
        "fee_amount": "0.29",
        "fee_currency": "EUR"
      },
      "trade": {
        "trade_id": "a7b6f4f8-0278-40a1-a435-7d02f93bafd0",
        "order_id": "ff119f4e-7918-4bec-8816-75d5b57865d1",
        "account_id": "726288e6-a463-4f88-9068-024ae8f97a34",
        "amount": "1",
        "side": "SELL",
        "instrument_code": "SOL_EUR",
        "price": "145",
        "time": "2024-11-14T10:26:57.241Z",
        "sequence": "58894265752",
        "matched_as": "MAKER"
      }
    },
    {
      "fee": {
        "fee_amount": "0.0020",
        "fee_currency": "SOL"
      },
      "trade": {
        "trade_id": "b1210d42-fc67-44ab-bb23-6e833f15df3f",
        "order_id": "024bf0cb-5810-47e5-8c52-2e926aebe537",
        "account_id": "726288e6-a463-4f88-9068-024ae8f97a34",
        "amount": "1",
        "side": "BUY",
        "instrument_code": "SOL_EUR",
        "price": "140",
        "time": "2024-11-14T10:25:22.143Z",
        "sequence": "58894265740",
        "matched_as": "MAKER"
      }
    }
  ],
  "max_page_size": 100
}

Request

Authorization
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Query Params
from
string <date-time>
optional
Defines start of a query search
to
string <date-time>
optional
Defines end of a query search
instrument_code
string 
optional
Instrument pair to get trades for
max_page_size
string 
optional
Set max desired page size. If no value is provided, by default a maximum of 100 results per page are returned. The maximum upper limit is 100 results per page
cursor
string 
optional
Pointer specifying the position from which the next pages should be returned

Responses

🟢200Success
application/json
Body
trade_history
array [object {2}] 
required
fee
object (Fee) 
required
trade
object (Trade) 
required
max_page_size
integer 
required
The amount of items requested
cursor
string 
optional
If there are more records to fetch, the cursor returned should be passed into the next request, to be used as a starting point for the next batch of trades
🟠400Bad Request
Previous
Get Trades for Order
Next
Get Trade by Trade ID
Built with