Margin Trade Order Event
Margin Trade Order Event
{
"type": "message",
"topic": "/margin/loan:BTC",
"subject": "order.open",
"channelType": "private",
"data": {
"currency": "BTC", //Currency
"orderId": "ac928c66ca53498f9c13a127a60e8", //Trade ID
"dailyIntRate": 0.0001, //Daily interest rate.
"term": 7, //Term (Unit: Day)
"size": 1, //Size
"side": "lend", //Lend or borrow. Currently, only "Lend" is available
"ts": 1553846081210004941 //Timestamp (nanosecond)
}
}
Topic: /margin/loan:{currency}
The system will push this message to the lenders when the order enters the order book.
Margin Order Update Event
{
"type": "message",
"topic": "/margin/loan:BTC",
"subject": "order.update",
"channelType": "private",
"data": {
"currency": "BTC", //Currency
"orderId": "ac928c66ca53498f9c13a127a60e8", //Order ID
"dailyIntRate": 0.0001, //Daily Interest Rate
"term": 7, //Term (Unit: Day)
"size": 1, //Size
"lentSize": 0.5, //Size executed
"side": "lend", //Lend or borrow. Currently, only "Lend" is available
"ts": 1553846081210004941 //Timestamp (nanosecond)
}
}
Topic: /margin/loan:{currency}
The system will push this message to the lenders when the order is executed.
Margin Order Done Event
{
"type": "message",
"topic": "/margin/loan:BTC",
"subject": "order.done",
"channelType": "private",
"data": {
"currency": "BTC", //Currency
"orderId": "ac928c66ca53498f9c13a127a60e8", //Order ID
"reason": "filled", //Done reason (filled or canceled)
"side": "lend", //Lend or borrow. Currently, only "Lend" is available
"ts": 1553846081210004941 //Timestamp (nanosecond)
}
}
Topic: /margin/loan:{currency}
The system will push this message to the lenders when the order is completed.