# Account Endpoints

## Get user info

> Get user info

```json
{"openapi":"3.0.1","info":{"title":"1dex api v1","version":"1.0"},"servers":[{"url":"https://api-v1.1dex.com"},{"url":"https://api-test-v1.1dex.com"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"api.Response":{"type":"object","properties":{"code":{"type":"integer","format":"uint32","description":"Response status code"},"message":{"type":"string","description":"Response message"},"data":{"description":"Response data payload (can be any type)"},"meta":{"type":"object","additionalProperties":true,"description":"Additional metadata with dynamic keys"}}},"entity.RespV1UserInfo":{"type":"object","properties":{"eos_account":{"type":"string"},"parent_eos_account":{"type":"string"},"permission":{"type":"string"}}}}},"paths":{"/api/v1/info":{"get":{"tags":["Account Endpoints"],"summary":"Get user info","description":"Get user info","responses":{"200":{"description":"user info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api.Response","properties":{"data":{"$ref":"#/components/schemas/entity.RespV1UserInfo"}}}}}}}}}}}
```

## Get user balances

> Get user balances

```json
{"openapi":"3.0.1","info":{"title":"1dex api v1","version":"1.0"},"servers":[{"url":"https://api-v1.1dex.com"},{"url":"https://api-test-v1.1dex.com"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"api.Response":{"type":"object","properties":{"code":{"type":"integer","format":"uint32","description":"Response status code"},"message":{"type":"string","description":"Response message"},"data":{"description":"Response data payload (can be any type)"},"meta":{"type":"object","additionalProperties":true,"description":"Additional metadata with dynamic keys"}}},"entity.SubAccountBalance":{"type":"object","properties":{"balance":{"type":"string"},"coin":{"type":"string"},"locked":{"type":"string"},"locks":{"type":"array","items":{"$ref":"#/components/schemas/entity.LockBalance"}},"usdt_price":{"type":"string"}}},"entity.LockBalance":{"type":"object","properties":{"balance":{"type":"string"},"pool_id":{"type":"integer"},"pool_symbol":{"type":"string"}}}}},"paths":{"/api/v1/balances":{"get":{"tags":["Account Endpoints"],"summary":"Get user balances","description":"Get user balances","responses":{"200":{"description":"user balances","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api.Response","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/entity.SubAccountBalance"}}}}}}}}}}}}
```

## Get history orders

> Get history orders

```json
{"openapi":"3.0.1","info":{"title":"1dex api v1","version":"1.0"},"servers":[{"url":"https://api-v1.1dex.com"},{"url":"https://api-test-v1.1dex.com"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"api.Response":{"type":"object","properties":{"code":{"type":"integer","format":"uint32","description":"Response status code"},"message":{"type":"string","description":"Response message"},"data":{"description":"Response data payload (can be any type)"},"meta":{"type":"object","additionalProperties":true,"description":"Additional metadata with dynamic keys"}}},"entity.Order":{"type":"object","properties":{"avg_price":{"type":"string"},"base_coin_precision":{"type":"integer"},"executed_amount":{"type":"string"},"filled_total":{"type":"string"},"history":{"type":"boolean"},"id":{"type":"string"},"order_amount":{"type":"string"},"order_cid":{"type":"string"},"order_id":{"type":"integer"},"order_price":{"type":"string"},"order_time":{"type":"string"},"order_total":{"type":"string"},"permission":{"type":"string"},"pool_base_coin":{"type":"string"},"pool_id":{"type":"integer"},"pool_quote_coin":{"type":"string"},"pool_symbol":{"type":"string"},"quote_coin_precision":{"type":"integer"},"side":{"type":"integer","description":"0 buy 1 sell"},"status":{"type":"integer","description":"0 open 1partially_filled 2full_filled 3.canceled"},"trader":{"type":"string"},"type":{"type":"integer","description":"0 market 1 limit"},"unread":{"type":"boolean"}}}}},"paths":{"/api/v1/history-orders":{"get":{"tags":["Account Endpoints"],"summary":"Get history orders","description":"Get history orders","parameters":[{"name":"pool_id","in":"query","description":"pool_id","schema":{"type":"string"}},{"name":"side","in":"query","description":"0 buy 1 sell","schema":{"type":"string"}},{"name":"type","in":"query","description":"0 market 1limit","schema":{"type":"string"}},{"name":"status","in":"query","description":"status","schema":{"type":"string"}}],"responses":{"200":{"description":"history orders","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api.Response","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/entity.Order"}}}}}}}}}}}}
```

## Get open orders

> Get open orders

```json
{"openapi":"3.0.1","info":{"title":"1dex api v1","version":"1.0"},"servers":[{"url":"https://api-v1.1dex.com"},{"url":"https://api-test-v1.1dex.com"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"api.Response":{"type":"object","properties":{"code":{"type":"integer","format":"uint32","description":"Response status code"},"message":{"type":"string","description":"Response message"},"data":{"description":"Response data payload (can be any type)"},"meta":{"type":"object","additionalProperties":true,"description":"Additional metadata with dynamic keys"}}},"entity.OpenOrder":{"type":"object","properties":{"avg_price":{"type":"string"},"base_coin_precision":{"type":"integer"},"executed_amount":{"type":"string"},"id":{"type":"string"},"order_amount":{"type":"string"},"order_cid":{"type":"string"},"order_id":{"type":"integer"},"order_price":{"type":"string"},"order_time":{"type":"string"},"order_total":{"type":"string"},"pool_base_coin":{"type":"string"},"pool_id":{"type":"integer"},"pool_quote_coin":{"type":"string"},"pool_symbol":{"type":"string"},"quote_coin_precision":{"type":"integer"},"side":{"type":"integer","description":"0 buy 1 sell"},"trader":{"type":"string"},"type":{"type":"integer","description":"0 market 1 limit"}}}}},"paths":{"/api/v1/open-orders":{"get":{"tags":["Account Endpoints"],"summary":"Get open orders","description":"Get open orders","parameters":[{"name":"pool_id","in":"query","description":"pool_id","schema":{"type":"string"}},{"name":"side","in":"query","description":"0 buy 1 sell","schema":{"type":"string"}}],"responses":{"200":{"description":"open order list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api.Response","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/entity.OpenOrder"}}}}}}}}}}}}
```

## Get history order detail

> Get history order detail

```json
{"openapi":"3.0.1","info":{"title":"1dex api v1","version":"1.0"},"servers":[{"url":"https://api-v1.1dex.com"},{"url":"https://api-test-v1.1dex.com"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"api.Response":{"type":"object","properties":{"code":{"type":"integer","format":"uint32","description":"Response status code"},"message":{"type":"string","description":"Response message"},"data":{"description":"Response data payload (can be any type)"},"meta":{"type":"object","additionalProperties":true,"description":"Additional metadata with dynamic keys"}}},"entity.OrderDetail":{"type":"object","properties":{"avg_price":{"type":"string"},"base_coin_precision":{"type":"integer"},"executed_amount":{"type":"string"},"filled_total":{"type":"string"},"history":{"type":"boolean"},"id":{"type":"string"},"order_amount":{"type":"string"},"order_cid":{"type":"string"},"order_id":{"type":"integer"},"order_price":{"type":"string"},"order_time":{"type":"string"},"order_total":{"type":"string"},"permission":{"type":"string"},"pool_base_coin":{"type":"string"},"pool_id":{"type":"integer"},"pool_quote_coin":{"type":"string"},"pool_symbol":{"type":"string"},"quote_coin_precision":{"type":"integer"},"side":{"type":"integer","description":"0 buy 1 sell"},"status":{"type":"integer","description":"0 open 1partially_filled 2 full_filled 3.canceled"},"trader":{"type":"string"},"trades":{"type":"array","items":{"$ref":"#/components/schemas/entity.TradeDetail"}},"type":{"type":"integer","description":"0 market 1 limit"},"unread":{"type":"boolean"}}},"entity.TradeDetail":{"type":"object","properties":{"base_coin":{"type":"string"},"base_quantity":{"type":"string"},"global_seq":{"type":"integer"},"maker":{"type":"string"},"maker_fee":{"type":"string"},"maker_order_cid":{"type":"string"},"maker_order_id":{"type":"integer"},"maker_permission":{"type":"string"},"pool_id":{"type":"integer"},"price":{"type":"string"},"quote_coin":{"type":"string"},"quote_quantity":{"type":"string"},"taker":{"type":"string"},"taker_fee":{"type":"string"},"taker_is_bid":{"type":"boolean"},"taker_order_cid":{"type":"string"},"taker_order_id":{"type":"integer"},"taker_permission":{"type":"string"},"timestamp":{"type":"string"},"tx_id":{"type":"string"}}}}},"paths":{"/api/v1/orders/{id}":{"get":{"tags":["Account Endpoints"],"summary":"Get history order detail","description":"Get history order detail","parameters":[{"name":"id","in":"path","description":"pool_id+order_id+side,ps:0-1-0 pool_id = 0,order_id = 1,side = buy","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"history order detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api.Response","properties":{"data":{"$ref":"#/components/schemas/entity.OrderDetail"}}}}}}}}}}}
```

## Get order by client order ID

> Get order by client order ID (order\_cid)

```json
{"openapi":"3.0.1","info":{"title":"1dex api v1","version":"1.0"},"servers":[{"url":"https://api-v1.1dex.com"},{"url":"https://api-test-v1.1dex.com"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"api.Response":{"type":"object","properties":{"code":{"type":"integer","format":"uint32","description":"Response status code"},"message":{"type":"string","description":"Response message"},"data":{"description":"Response data payload (can be any type)"},"meta":{"type":"object","additionalProperties":true,"description":"Additional metadata with dynamic keys"}}},"entity.Order":{"type":"object","properties":{"avg_price":{"type":"string"},"base_coin_precision":{"type":"integer"},"executed_amount":{"type":"string"},"filled_total":{"type":"string"},"history":{"type":"boolean"},"id":{"type":"string"},"order_amount":{"type":"string"},"order_cid":{"type":"string"},"order_id":{"type":"integer"},"order_price":{"type":"string"},"order_time":{"type":"string"},"order_total":{"type":"string"},"permission":{"type":"string"},"pool_base_coin":{"type":"string"},"pool_id":{"type":"integer"},"pool_quote_coin":{"type":"string"},"pool_symbol":{"type":"string"},"quote_coin_precision":{"type":"integer"},"side":{"type":"integer","description":"0 buy 1 sell"},"status":{"type":"integer","description":"0 open 1partially_filled 2full_filled 3.canceled"},"trader":{"type":"string"},"type":{"type":"integer","description":"0 market 1 limit"},"unread":{"type":"boolean"}}}}},"paths":{"/api/v1/orders/client-id/{id}":{"get":{"tags":["Account Endpoints"],"summary":"Get order by client order ID","description":"Get order by client order ID (order_cid)","parameters":[{"name":"id","in":"path","description":"Client order ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api.Response","properties":{"data":{"$ref":"#/components/schemas/entity.Order"}}}}}}}}}}}
```

## Get trades by subaccount

> Get recent trades for the authenticated subaccount

```json
{"openapi":"3.0.1","info":{"title":"1dex api v1","version":"1.0"},"servers":[{"url":"https://api-v1.1dex.com"},{"url":"https://api-test-v1.1dex.com"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"api.Response":{"type":"object","properties":{"code":{"type":"integer","format":"uint32","description":"Response status code"},"message":{"type":"string","description":"Response message"},"data":{"description":"Response data payload (can be any type)"},"meta":{"type":"object","additionalProperties":true,"description":"Additional metadata with dynamic keys"}}},"entity.TradeDetail":{"type":"object","properties":{"base_coin":{"type":"string"},"base_quantity":{"type":"string"},"global_seq":{"type":"integer"},"maker":{"type":"string"},"maker_fee":{"type":"string"},"maker_order_cid":{"type":"string"},"maker_order_id":{"type":"integer"},"maker_permission":{"type":"string"},"pool_id":{"type":"integer"},"price":{"type":"string"},"quote_coin":{"type":"string"},"quote_quantity":{"type":"string"},"taker":{"type":"string"},"taker_fee":{"type":"string"},"taker_is_bid":{"type":"boolean"},"taker_order_cid":{"type":"string"},"taker_order_id":{"type":"integer"},"taker_permission":{"type":"string"},"timestamp":{"type":"string"},"tx_id":{"type":"string"}}}}},"paths":{"/api/v1/trades":{"get":{"tags":["Account Endpoints"],"summary":"Get trades by subaccount","description":"Get recent trades for the authenticated subaccount","parameters":[{"name":"limit","in":"query","description":"limit count (default 50, max 100)","schema":{"type":"integer"}},{"name":"startTime","in":"query","description":"filter trades after this timestamp (Unix timestamp in seconds)","schema":{"type":"integer"}},{"name":"endTime","in":"query","description":"filter trades before this timestamp (Unix timestamp in seconds)","schema":{"type":"integer"}},{"name":"global_seq","in":"query","description":"filter trades with global sequence number greater than this value","schema":{"type":"integer"}},{"name":"sort","in":"query","description":"sort direction for timestamp (asc or desc, default desc)","schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"trade detail list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api.Response","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/entity.TradeDetail"}}}}}}}}}}}}
```

## Get subaccount transfers

> Get transfer records between subaccount and main account

```json
{"openapi":"3.0.1","info":{"title":"1dex api v1","version":"1.0"},"servers":[{"url":"https://api-v1.1dex.com"},{"url":"https://api-test-v1.1dex.com"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"api.Response":{"type":"object","properties":{"code":{"type":"integer","format":"uint32","description":"Response status code"},"message":{"type":"string","description":"Response message"},"data":{"description":"Response data payload (can be any type)"},"meta":{"type":"object","additionalProperties":true,"description":"Additional metadata with dynamic keys"}}},"entity.SubAccountTransfer":{"type":"object","properties":{"amount":{"type":"string","description":"transfer amount"},"contract":{"type":"string","description":"token contract address"},"symbol":{"type":"string","description":"token symbol"},"from":{"type":"string","description":"sender address"},"to":{"type":"string","description":"receiver address"},"tx_id":{"type":"string","description":"transaction ID"},"side":{"type":"string","description":"transfer direction (in/out)"},"sid":{"type":"string","description":"subaccount ID"},"name":{"type":"string","description":"subaccount name"},"created_at":{"type":"string","format":"date-time","description":"transfer creation time"}}}}},"paths":{"/api/v1/transfers":{"get":{"tags":["Account Endpoints"],"summary":"Get subaccount transfers","description":"Get transfer records between subaccount and main account","parameters":[{"name":"limit","in":"query","description":"limit count","schema":{"type":"integer"}},{"name":"startTime","in":"query","description":"start time in Unix timestamp format (seconds since epoch)","schema":{"type":"integer"}},{"name":"endTime","in":"query","description":"end time in Unix timestamp format (seconds since epoch)","schema":{"type":"integer"}},{"name":"transfer_id","in":"query","description":"filter transfers with id greater than this value","schema":{"type":"integer"}},{"name":"sort","in":"query","description":"sort direction for created_at (asc or desc, default desc)","schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"transfer records with pagination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api.Response","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/entity.SubAccountTransfer"}}}}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.1dex.com/developer/restful-api-reference/account-endpoints.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
