History of completed orders
Request
Query parameters
| Name | Parameter type | Definition |
|---|---|---|
| market | string | Filter by trading pair (e.g., `TRX_USDT`) |
| direction | string | Filter by directionAvailable options:• buy• sell |
| order_id | string | Filter by order ID in the order book |
| client_order_id | string | Filter by client order ID |
| limit | string | A special parameter that sets the maximum number of records the request will return |
| offset | string | A special parameter that indicates the number of records to skip |
Parameter type
stringDefinition
Filter by trading pair (e.g., `TRX_USDT`)Parameter type
stringDefinition
Filter by directionAvailable options:- buy- sellParameter type
stringDefinition
Filter by order ID in the order bookParameter type
stringDefinition
Filter by client order IDParameter type
stringDefinition
A special parameter that sets the maximum number of records the request will returnParameter type
stringDefinition
A special parameter that indicates the number of records to skip
Response
Order response parameters
| Name | Parameter type | Definition |
|---|---|---|
| id | string | Order ID in the order book |
| type | string | Order typeAvailable options:• buy• sell |
| direction | string | Order directionAvailable options:• buy• sell |
| symbol | string | Filter by trading pair (e.g., `TRX_USDT`) |
| quantity | string|null | Requested quantity of the base asset |
| filledQuantity | string | Filled quantity of base asset |
| filledValue | string | Filled quantity of quote asset |
| state | string | Current state of the order (e.g., 'completed') |
| internalState | string | Internal state of the order (e.g., 'filled') |
| createdAt | string | Time when the order was created |
| finishedAt | string | Time when the order was completed |
| stopLossPrice | string|null | The threshold market price of the asset, upon reaching which the order will be automatically canceled |
Parameter type
stringDefinition
Order ID in the order bookParameter type
stringDefinition
Order typeAvailable options:- buy- sellParameter type
stringDefinition
Order directionAvailable options:- buy- sellParameter type
stringDefinition
Filter by trading pair (e.g., `TRX_USDT`)Parameter type
string|nullDefinition
Requested quantity of the base assetParameter type
stringDefinition
Filled quantity of base assetParameter type
stringDefinition
Filled quantity of quote assetParameter type
stringDefinition
Current state of the order (e.g., 'completed')Parameter type
stringDefinition
Internal state of the order (e.g., 'filled')Parameter type
stringDefinition
Time when the order was createdParameter type
stringDefinition
Time when the order was completedParameter type
string|nullDefinition
The threshold market price of the asset, upon reaching which the order will be automatically canceled
Deal response parameters
| Name | Parameter type | Definition |
|---|---|---|
| id | string | Trade id |
| state | string | Trade state (e.g., `completed`) |
| createdAt | string | Time when the trade was created |
| completedAt | string | Time when the trade was completed |
| averageFilledPrice | string | Average filled price for the trade |
Parameter type
stringDefinition
Trade idParameter type
stringDefinition
Trade state (e.g., `completed`)Parameter type
stringDefinition
Time when the trade was createdParameter type
stringDefinition
Time when the trade was completedParameter type
stringDefinition
Average filled price for the trade
Deal transaction response parameters
| Name | Parameter type | Definition |
|---|---|---|
| id | string | Transaction id |
| tradeRole | string | Role in the tradeAvailable options:• taker• maker |
| filledPrice | string | Filled price for the transaction |
| filledQuantity | string | Executed amount in the base currency |
| filledValue | string | Executed amount in the quote currency |
| fee | string | Transaction fee |
| feeCurrency | string | Currency in which the fee is charged |
| committedAt | string | Time of transaction execution |
Parameter type
stringDefinition
Transaction idParameter type
stringDefinition
Role in the tradeAvailable options:- taker- makerParameter type
stringDefinition
Filled price for the transactionParameter type
stringDefinition
Executed amount in the base currencyParameter type
stringDefinition
Executed amount in the quote currencyParameter type
stringDefinition
Transaction feeParameter type
stringDefinition
Currency in which the fee is chargedParameter type
stringDefinition
Time of transaction execution
Response example
1{
2 "result": [
3 {
4 "id": "01JEXAPY04JDFBVFC2D23BCKMK",
5 "type": "market",
6 "direction": "sell",
7 "symbol": "TRX_USDT",
8 "quantity": "67.5400000000000000",
9 "filledQuantity": "67.5400000000000000",
10 "filledValue": "20.0053480000000000",
11 "state": "completed",
12 "internalState": "filled",
13 "createdAt": "2024-12-12 11:40:19",
14 "finishedAt": "2024-12-12 11:40:21",
15 "deal": {
16 "id": "01JEXAPZ9C9TWENPFZJASZ1YD2",
17 "state": "completed",
18 "createdAt": "2024-12-12 11:40:21",
19 "completedAt": "2024-12-12 11:40:21",
20 "averageFilledPrice": "0.2962000000000000",
21 "transactions": [
22 {
23 "id": "01JEXAPZ9C9TWENPFZJASZ1YD3",
24 "tradeRole": "taker",
25 "filledPrice": "0.2962000000000000",
26 "filledQuantity": "67.5400000000000000",
27 "filledValue": "20.0053480000000000",
28 "fee": "0.0000000000000000",
29 "feeCurrency": "USDT",
30 "committedAt": "2024-12-12 11:40:21"
31 }
32 ]
33 }
34 },
35 {
36 "id": "01JEXAJDK51C453Z3395RTAY8Y",
37 "type": "market",
38 "direction": "buy",
39 "symbol": "TRX_USDT",
40 "value": "20.0000000000000000",
41 "filledQuantity": "67.5400000000000000",
42 "filledValue": "19.9985940000000000",
43 "state": "completed",
44 "internalState": "filled",
45 "createdAt": "2024-12-12 11:37:51",
46 "finishedAt": "2024-12-12 11:37:53",
47 "deal": {
48 "id": "01JEXAJF41RJ05Z220F2H01S9Z",
49 "state": "completed",
50 "createdAt": "2024-12-12 11:37:53",
51 "completedAt": "2024-12-12 11:37:53",
52 "averageFilledPrice": "0.2961000000000000",
53 "transactions": [
54 {
55 "id": "01JEXAJF4ADPPPVH3NVP2SFX0F",
56 "tradeRole": "taker",
57 "filledPrice": "0.2961000000000000",
58 "filledQuantity": "67.5400000000000000",
59 "filledValue": "19.9985940000000000",
60 "fee": "0.0000000000000000",
61 "feeCurrency": "TRX",
62 "committedAt": "2024-12-12 11:37:53"
63 }
64 ]
65 }
66 },
67 {
68 "id": "01JEXAFCCC5ZVJPZAAHHDKQBNG",
69 "type": "limit",
70 "direction": "sell",
71 "symbol": "TRX_USDT",
72 "price": "0.2964000000000000",
73 "quantity": "20.0000000000000000",
74 "value": "5.9280000000000000",
75 "filledQuantity": "20.0000000000000000",
76 "filledValue": "5.9280000000000000",
77 "state": "completed",
78 "internalState": "filled",
79 "createdAt": "2024-12-12 11:36:12",
80 "finishedAt": "2024-12-12 11:36:22",
81 "deal": {
82 "id": "01JEXAFP50QGFS8CGY2YRR5EDV",
83 "state": "completed",
84 "createdAt": "2024-12-12 11:36:22",
85 "completedAt": "2024-12-12 11:36:22",
86 "averageFilledPrice": "0.2964000000000000",
87 "transactions": [
88 {
89 "id": "01JEXAFP55H5XHF3SHRVCEQ1G9",
90 "tradeRole": "taker",
91 "filledPrice": "0.2964000000000000",
92 "filledQuantity": "20.0000000000000000",
93 "filledValue": "5.9280000000000000",
94 "fee": "0.0000000000000000",
95 "feeCurrency": "USDT",
96 "committedAt": "2024-12-12 11:36:22"
97 }
98 ]
99 }
100 }
101 ]
102}
103 CopyPossible codes
404: User or resource not found
422: Invalid input data
500: Internal server error
Possible combinations
| Name | Definition | internal_state |
|---|---|---|
| completed | The order is completed and fully filled | filled |
| canceled | The order was not filled and was canceled by the user | empty |
| canceled_by_stop_loss | The order was not filled and was automatically canceled due to the market reaching the stop_loss price | empty |
| canceled | The order was partially filled and then canceled by the user | partially_filled |
| canceled_by_stop_loss | The order was partially filled and then automatically canceled due to the market reaching the stop_loss price | partially_filled |
Definition
The order is completed and fully filledDefinition
The order was not filled and was canceled by the userDefinition
The order was not filled and was automatically canceled due to the market reaching the stop_loss priceDefinition
The order was partially filled and then canceled by the userDefinition
The order was partially filled and then automatically canceled due to the market reaching the stop_loss price
Possible errors
example responses:
1{
2 "state": 0,
3 "message": "Standard validation error"
4}CopyResponse example with error
1{
2 "code": 0,
3 "message": "Validation failed.",
4 "errors": [
5 {
6 "property": "direction",
7 "value": "sells",
8 "message": "The value you selected is not a valid choice."
9 }
10 ]
11}Copy