Huobi Global is going to launch two new restful APIs for stable coin

Dear API users,

With System Upgrade, Introduce two new Restful APIs to allow user to exchange between HUSD and a stable coin with Offline the previous interfaces.

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

Huobi Global
September 12, 2019

The following are change details:

1. GET v1/stable-coin/quote
API permission: read-only

Request Parameters.

ParameterData TypeRequiredDescriptionAllowable Values
currencystringtrueStable coin nameUSDT/PAX/USDC/TUSD
amountstringtrueamount of stable coin to exchange (the value must be an intger.) 
typestringtruetype of the exchange‘buy’, ‘sell’

Response Pamameters.

ParameterData TypeDescriptionNote
currencystringStable coin nameUSDT/PAX/USDC/TUSD
amountstringamount of stable coin to exchangeDue to factors such as the amount of the exchange account, the amount returned may be smaller than the amount requested.
typestringtype of the exchange‘buy’, ‘sell’
exchange-amountstringamount of HUSD to exchange in or out() 
quote-idstringstable currency quoteID 
expirationstringTerm of validity 

Error Code.

Error-codeDescription
invalid-currency 
invalid-amountamount<100,000 or amount>the max
invalid-typetype not 'buy' or 'sell'
quote-failureother errors

2. POST v1/stable-coin/exchange
API permission: Trade

Request Parameters.

ParameterData TypeRequiredDescriptionAllowable Values
quote-idstringtruestable currency quoteID 

Response Pamameters.

ParameterData TypeDescriptionNote
transact-idlongExchange record id 
currencystringStable coin nameUSDT/PAX/USDC/TUSD
amountstringamount of stable coin to exchange 
typestringtype of the exchange‘buy’, ‘sell’
exchange-amountstringamount of HUSD to exchange in or out 
timelongtime stamp 

Error Code.

Error-codeDescription
invalid-quote-idParamemter ‘quote-id’ is invalid
insufficient-balanceinsufficient balance to buy or sell stable coins
insufficient-quotathe quota is exceeded
exchange-failureother errors
Base-user-request-exceed-limitOperation is too frequen