Get user trade history

Rate limit: 5 every second

API Overview


HTTP method

GET

Path

/api/v2/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 1
market string N Trading pair "LRC-ETH"
orderHash string N If a value is provided, only returns the trades associated with the given order "0x9d114267e8b261457d
567093c13cf3deea5f14
c9235be26c6fa833dba1
2a9632"
offset integer N Number of records to skip 1
limit integer N Number of records to return 50
fromId integer N Pagination of data to return records earlier than the requested id 1

Request example

HTTP
CURL
GET https://api.loopring.io/api/v2/user/trades?accountId=1&market=LRC-ETH&orderHash=0x9d114267e8b261457d567093c13cf3deea5f14c9235be26c6fa833dba12a9632&offset=1&limit=50&fromId=1 HTTP/1.1
Host: api.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://api.loopring.io/api/v2/user/trades\?accountId\=1\&market\=LRC-ETH\&orderHash\=0x9d114267e8b261457d567093c13cf3deea5f14c9235be26c6fa833dba12a9632\&offset\=1\&limit\=50\&fromId\=1

Response fields

Field Type Required Description Example
resultInfo ResultInfo Y Information returned by the API /
data TradeList N A list of trades /

Response example

{
    "resultInfo" : {
        "code" : 0,
        "message" : "SUCCESS"
    },
    "data" : {
        "totalNum" : 100,
        "trades" : [["0","0","BUY","0","0","LRC-USDT","0"]]
    }
}

Status code

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

Model


TradeList

A list of trades

Field Type Required Description Example
totalNum integer Y Total number of tradings 100
trades List[List[string]] Y List of trades records, each trade record in the order of the array is the trade time, record id, buying and selling direction, volume, price, market and fees "[["0","0","BUY","0",
"0","LRC-USDT","0"]]"

results matching ""

    No results matching ""