Clients can retrieve open and executed order information
QUERY TRADE
SAMPLE REQUEST TRADE
{“type”:”querytrade”, “fromtime”:”1555522543000”}
This is to query the trades for a user.
Only administrator can specify “userid” field.
“fromtime” field is optional, if set, it is to specify cutofftime to query
“security” field is optional, if set, it is to return trades for that security only
SAMPLE RESPONSE ON SUCCESS OR FAILURE
“total_rec” tells you how many records there areavailable.
For each record, there is “rec_no”, this is just for counting. Total number of records received should match value in “total_rec” field. It should be sort by “time”.
If there are more than 100 records, system can send you multiple response, each will have100 records.
Must provide “security” and “refno” field (that is FI’s order refno).
{“result”:”OK”,”refno”:”5GS08WTIE8CWA0”,”data”:{“updtime”:”15575052350
85”,”tif”:”GTC”,”execamount”:”10000”,”qty”:”1000”,”security”:”BTCUSD”,”type”:”or
der”,”clientorderid”:”ID1”,”liveqty”:”900”,”category”:”BRUT”,”refno”:”5GS08WTIE8
CWA0”,”price”:”100”,”execqty”:”100”,”side”:”S”},”security”:”BTCUSD”,”type”:”quer
yorder”}
{“result”:”order not found”,”refno”:”5GS08WTIE8CWA0”,”security”:”BTCUS
D”,”type”:”queryorder”}
TRADE HISTORY
Symbol- type=getsymbols Close- type=highlow. Get data per symbol if exists
Open- type=subscribeonopen
% Change - calculating is (openingprice - prevcloseprice)/prevcloseprice * 100
openingprice from type=highlow
prevcloseprice from type=highlow
High- type=highlow. Get data per symbol if exists
Low- type=highlow. Get data per symbol if exists • Best Bid - type=subscribe . Max price from bids
Best Ask - type=subscribe. Min price from asks
Quantity in Trade - type=subscribe. Sum of qty from books
Must set “security” field for the symbol that you query.
Optional field “extradays”, by default, system return last 24-hour trade info back to you. If you need extra history, set “extradays”, for example to “3” for 3 extra previous day history info.
The query returns the trade history in 1-minute block. If that minute has trade, a corresponding block will be return with summary of that minute high/low/first/last trade price as well as volume and num of trades info.
There can be multiple responses to one query if there are more than 100 entries in response. Each response will carry maximum of 100 entries. “total_rec” tells how many records there should be, and “rec_no” tell you current number of record.
{"type":"subscribehighlow","security":"LTCUSD"} R {"openingprice":"166.39","security":"LTCUSD","highprice":"45000","lowprice":"1","prevcloseprice":"176","type":"highlow"}
PERCENT Change calc
(openingprice - prevcloseprice)/prevcloseprice *100 4. High - highprice Q {"type":"subscribehighlow","security":"LTCUSD"} R {"openingprice":"166.39","security":"LTCUSD","highprice":"45000","lowprice":"1","prevcloseprice":"176","type":"highlow"}
LOW lowprice
{"type":"subscribehighlow","security":"LTCUSD"} R {"openingprice":"166.39","security":"LTCUSD"
The corresponding time (which is in EPOCH milliseconds),"tradeqty" for total qty and "tradeamount" for total amount.
Where we use the message subscribeonopen, subscribe (book, trade), subscribehighlow:
MARKET STATISTICS MAIN PAGE OF PORTAL
Portal -> Market
Portal -> Market -> Trade
TRADE HISTORY:
Portal -> Market -> Trade - Only Chart
AZ -> Market -> Daily Trade Summary Testing
ADDITIONAL
for assets (such as BTC, USD), there is summary of:
"totaldeposit"
"totalwithdraw"
"commamount"
For tradable symbols (such as pairs), there is summary of "high","low","open","close" and the corresponding time (which is in EPOCH milliseconds),"tradeqty" for total qty and "tradeamount" for total amount.
For assets (such as BTC, USD), there is summary of "totaldeposit","totalwithdraw", in addition to "commamount"
“totaltrades” is total number of trades. “totalcommtrades” is total number of commission trades. If it is not 0, then “details” field will carry an array of total commission by symbols.