Get user trade history

Rate limit: 5 every second

API Overview


HTTP method

GET

Path

/api/v3/user/trades

Summary

Get user trade history.

API description


HTTP Header

Field Type Required Description Example
X-API-KEY string Y ApiKey "HlkcGxbqBeaF76j4rvPaOasyfPwnkQ
6B6DQ6THZWbvrAGxzEdulXQvOKLrRW
ZLnN"

Request parameters

Field Type Required Description Example
accountId integer Y Account ID, some hash query APIs doesnt need it if in hash query mode, check require flag of each API to see if its a must. 1
market string N Trading pair "LRC-ETH"
orderHash string N Order hash "0x9d114267e8
b261457d5670
93c13cf3deea
5f14c9235be2
6c6fa833dba1
2a9632"
offset integer N Number of records to skip 1
limit integer N Number of records to return 50
fromId integer N The begin id of the query 1
fillTypes string N request.getUserTxs.fillTypes
Allowable : ['dex', 'amm']
"dex"

Request example

HTTP
CURL
GET https://api3.loopring.io/api/v3/user/trades?accountId=1&market=LRC-ETH&orderHash=0x9d114267e8b261457d567093c13cf3deea5f14c9235be26c6fa833dba12a9632&offset=1&limit=50&fromId=1&fillTypes=dex HTTP/1.1
Host: api3.loopring.io
Connection: keep-alive
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: zh,en;q=0.9
X-API-KEY: sra1aavfa
curl -H "X-API-KEY:sra1aavfa" https://api3.loopring.io/api/v3/user/trades\?accountId\=1\&market\=LRC-ETH\&orderHash\=0x9d114267e8b261457d567093c13cf3deea5f14c9235be26c6fa833dba12a9632\&offset\=1\&limit\=50\&fromId\=1\&fillTypes\=dex

Response fields

Field Type Required Description Example
totalNum integer Y Total number of tradings 100
trades List[List[string]] Y field.marketTrades.trades "[["0","0","B
UY","0","0",
"LRC-USDT","
0","accountI
d","tokenId"
, "storageId"]
]"

Response example

{
  "totalNum" : 100,
  "trades" : [["0","0","BUY","0","0","LRC-USDT","0","accountId","tokenId", "storageId"]]
}

Status code

Value Description
100000 Unknown error
104001 Empty ApiKey
104002 Invalid ApiKey
104003 Invalid Account ID

results matching ""

    No results matching ""