Understanding the binance API for symbols and prices

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

BTC is a coin
BTCUSDT is a symbol, necessary to know worth of BTC in USDT

Also what is the api to use if I want to buy USDT with my BTC?

You can sell BTC to receive USDT by following https://binance-docs.github.io/apidocs/spot/en/#new-order-trade

Thanks very much for your response, I checked the link for new-order-trade, this is so complicated, so if I want to sell 0.05 quantity of my BTC for USDT at market price, it will be like this:
POST https://api.binance.com/api/v3/order?symbol=BTCUSDT&side=SELL&type=MARKET&quantity=0.05&timestamp=xxx&signature=xxx

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!

Hi. Your understanding towards the market order is correct.
You can either take a look at the examples for the signature part ( https://github.com/binance/binance-signature-examples/tree/master/nodejs ) or make use of the connector project ( https://github.com/binance/binance-connector-node ).

Thanks for your response, I also got confused about which server to connect, since there are binance.com and binance.us, In the US we are required to use binance.us since binance.com is illegal in the US, so the url: POST https://api.binance.com/api/v3/order?symbol=… will be connected to binance.com, so for binaince.us, what url should I use? also can the connector project library be used for binance.us?
Thanks for your help again!

By the way, I have a question for the query:
POST https://api.binance.com/api/v3/order?symbol=BTCUSDT&side=SELL&type=MARKET&quantity=0.05&timestamp=xxx&signature=xxx

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.