Huobi Global is going to support six new features in REST API for cross margin trading

Dear API users,

Since the effective day of this notification, Huobi Global will be supporting a few new endpoints in REST API as following –
1)POST /v1/cross-margin/transfer-in transfer asset from spot trading account to cross-margin account
2)POST /v1/cross-margin/transfer-out transfer asset from cross-margin account to spot trading account
3)POST /v1/cross-margin/orders place an order to apply cross-margin loan
4)POST /v1/cross-margin/orders/{order-id}/repay repay a previous cross-margin loan order
5)GET /v1/cross-margin/loan-orders query existing cross-margin loan orders
6)GET /v1/cross-margin/accounts/balance query cross-margin account balance

Effective Date:October 11, 2019 (GMT+8)
All the changes will be updated on 【API Docs】

Huobi Global
October 11, 2019

The following are change details:
1. REST API – Transfer asset between spot trading account and cross-margin account

POST /v1/cross-margin/transfer-in (API key permission: Trade)
POST /v1/cross-margin/transfer-out (API key permission: Trade)

Request parameter(s)

ParameterRequiredData TypeDescriptionValue RangeDefault Value
currencytruestringCurrency  
amounttruestringTransfer amount  

Response

ParameterRequiredData TypeDescriptionValue Range
statustruestringStatus"OK" or "Error"
datatrueintTransfer ID 

2. REST API – Place a cross-margin loan order

POST /v1/cross-margin/orders (API key permission: Trade)

Request parameter(s)

ParameterRequiredData TypeDescriptionValue RangeDefault Value
currencytruestringCurrency  
amounttruestringLoan amount  

Response

ParameterRequiredData TypeDescriptionValue Range
statustruestringStatus"OK" or "Error"
datatrueintMargin order ID 

3. REST API – Repay a previous cross-margin loan order

POST /v1/cross-margin/orders/{order-id}/repay (API key permission: Trade)

Request parameter(s)

ParameterRequiredData TypeDescriptionValue RangeDefault Value
order-idtruestringMargin order ID  
amounttruestringRepay amount  

Response

ParameterRequiredData TypeDescriptionValue Range
statustruestringStatus"OK" or "Error"
datatrueintMargin order id 

4. REST API – Query existing cross-margin loan orders

GET /v1/cross-margin/loan-orders (API key permission: Read)

Request parameter(s)

ParameterRequiredData TypeDescriptionValue RangeDefault Value
start-datefalsestringStart time (in format yyyy-mm-dd)  
end-datefalsestringEnd time (in format yyyy-mm-dd)  
currencyfalsestringCurrency  
statefalsestringOrder statuscreated,accrual,cleared,invalidall
fromfalsestringStart margin order ID 0
directfalsestring prev,next 
sizefalsestringNumber of items in each response[10,100]100

Response

ParameterRequiredData TypeDescriptionValue Range
statustruestringStatus"OK" or "Error"
datatrueobject  
{ idtruelongMargin order ID 
user-idtruelongUser ID 
 account-idtruelongAccount ID 
currencytruestringCurrency 
loan-amounttruestringThe amount of origin loan 
loan-balancetruestringThe amount of the loan left 
interest-amounttruestringThe accumulated loan interest 
interest-balancetruestringThe amount of loan interest left 
filled-pointstruestringPoint deduction amount 
filled-httruestringHT deduction amount 
 created-attruelongMargin order creation time 
 accrued-attruelongLatest accrued time 
state }truestringOrder statuscreated,accrual,cleared,invalid

5. REST API – Query cross-margin account balance

GET /v1/cross-margin/accounts/balance (API key permission: Read)

Request parameter(s)

Null

Response

ParameterRequiredData TypeDescriptionValue Range
statustruestringStatus"OK" or "Error"
datatrueobject  
{ idtrueintAccount ID 
typetruestringAccount type (margin or cross-margin)cross-margin
statetruestringAccount statusworking,fl-sys,fl-end,fl-negative
risk-ratetruestringRisk rate 
acct-balance-sumtruestringAccount balance totaled in USDT 
debt-balance-sumtruestringDebt balance totaled in USDT 
listtruearrayAccount layout by individual currency 
{ currencytruestringCurrency 
typetruestringAccount typetrade,frozen,loan,interest,transfer-out-available,loan-available
balance }}truestringBalance (note: while type=transfer-out-available, if balance=-1, it implicates that all balance can be transferred out.)