post
https://sandboxapi.legendtrading.com/app/rfq
Get an indicative quote (price) using the amount of cryptocurrencies
(e.g. how much USD does it cost to buy 0.345 BTC?)
通过币的金额询价
RFQ stands for "Request for Quote".
import requests
import uuid
headers = {
'Authorization': 'Bearer %s' % api_token,
'Accept':'application/json'
}
# Get a quote for buying 1 BTC using USD
quantity = '1'
side = 'buy'
pair = 'BTCUSD'
post_data = {
'pair': pair,
'side': side,
'quantity': quantity,
}
response = requests.post('https://sandboxapi.legendtrading.com/app/rfq/', json=post_data, headers=headers)
print(response.json())