Hi All, I am new to binance API, when I tried to get price for BTC or USDT, I got invalid symbol, but everybody knows these are correct symbols in any exchange, but if I use the following url with the combined symbol, it returns result, I am guessing it means each BTC worth of how many USDT, is this correct? https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDT
Also what is the api to use if I want to buy USDT with my BTC?
Thanks
is this correct query?
Using nodejs, how to generate the signature with my apiKey or secretKey? I understand the timestamp is the sending time of the POST.
Thanks again for your help!
since it is a POST, instead of using query string like symbol=BTCUSDT, should we use json format as inside the post body? since query string is for GET, not POST.
like:
let url= “https://api.binance.com/api/v3/order”;
let data = {
symbol: “BTCUSDT”,
side: “SELL”,
type: “MARKET”,
quantity: 0.05,
timestamp: xxx,
signature: xxx
}
const res = await axios.post(url, data, {
headers: {
‘Content-Type’: ‘application/json’,
}
}
)
Hi.
If you are in the states, to use .us service is always suggested.
The design idea of these 2 API services are similar and it’s fine to use the connector library provided by .com service after replacing the base URL. However, before you start to use it, please double check the .us API document to make sure the same API is available.
Here is the API document for .us service. https://github.com/binance-us/binance-official-api-docs
Usually POST requests have the data sent via body; however, it’s designed differently here.