https://github.com/binance/binance-spot-api-docs https://developers.binance.com/en Binance Official English Group https://t.me/binanceexchange Binance English Announcements https://t.me/binance_announcements
Binance presale Initia coin to be listed on April 24
Читать полностью…I am using Binance's demo(message_handler) to subscribe to all limited depths of um_futures perpetual contracts. Why does the websocket connection always get lost within less than 1 minute? I am using a Japanese server with 4 cores and 8G of memory, and the network is fine.
mycode like this:
my_client = UMFuturesWebsocketClient(on_message=message_handler,is_combined=True)
for sy in symbols:
params.append(sy.lower() + '@depth5@100ms')
my_client.send_message_to_server(params)
Is there an API for adding an address to the whitelist, please?
Читать полностью…This FAQ explains on how to create the type of Key you are looking for: https://www.binance.com/en/support/faq/detail/6b9a63f1e3384cf48a2eedb82767a69a
Please, make sure you follow all the suggestions on how to generate the signature for the request: https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-api-general-info
You can refer to this script example: https://github.com/binance/binance-signature-examples/blob/master/python/websocket-api/websocket_api_client.py
-admin
You can reach out to the customer support for non-API related questions, please: https://www.binance.com/en/support/chat-invitation -admin
Читать полностью…Hello, As per our terms of use, We only provide API services to the unrestricted regions only, Thanks for understanding!
-admin
We are ensuring our compliance controls restrict API service based on IP address if your connection is from a restricted location, such as Canada, Netherlands, United States, Cuba, Democratic People’s Republic of North Korea (“DPRK”), Iran, Syria, Crimea region and any non-government controlled areas of Ukraine, and other locations as designated by Binance Operators from time to time as a Restricted Location. If you or your server are located in a restricted location your API service will not be supported.
For more details about the prohibition list, you may refer to this page, https://www.binance.com/en/legal/list-of-prohibited-countries
-admin
Hey, maybe you can help me understand the OTOCO order type too?
I'm stuck on the problem where the order that should open the deal needs to be a limit order with a stop price. Here's an example:
Price now: $100
I need an order that buys 100 coins when the price goes above $110.
Is this possible in OTOCO orders on the "working" (first) order side?
Yep, I’ve been working on it for a few hours :)
That stupid GPT kept sending me in the wrong direction, insisting over and over that it wasn’t possible
Yes, correct, BIPS my bad, 200 would be correct on that.
Читать полностью…Let me transfer it to my scenario, to fix, that I got understand anything right:
params = {
"symbol": "SOMEONE",
"side": "SELL",
"quantity": 1,
"aboveType": "TAKE_PROFIT",
"belowType": "STOP_LOSS",
"aboveStopPrice: "105",
"aboveTrailingDelta": 200,
"belowStopPrice": 95,
}
right?
Does anyone use trailing stops with OCO orders?
I got confused by the manual, and ChatGPT completely threw me off.
Here’s the goal:
I bought 100 coins at $100 each.
I want to sell them if the price drops to $95 (stop_loss/stop_loss_limit).
I also want a trailing stop to activate if the price goes above $105, with a 2% offset, so that if the price reaches $200 and starts falling, the coins would sell at $196.
Which parameters do I need to set, and where?
oh okay i got it. Thank you!
Looking forward to hearing from you soon
hi admin again, could you help me with this?
Читать полностью…There could be many reasons why websocket connection lost, for example WebSocket connections have a limit of 10 incoming messages per second. If it drop within minute, the reasons might be related to that. You can test your code different environment, it might help to reduce the reasons -admin
Читать полностью…Hi there, I was wondering if there is any information yet
Читать полностью…Hi, I used this API request - /sapi/v2/loan/flexible/loanable/data.
But it does not provide information about the current amount of a specific coin for borrowing.
The field - flexibleMaxLimit - informs about the maximum possible loan amount, but does not indicate that there are coins available for providing a loan.
Maybe there is some API request that will provide information about the availability of coins for providing a loan?
hello, could you please give me one sample of how to construct the signature for websocket api of place order? for binance spot, I check the below documents, it's a bit confused. especially for Ed25519 key. I only the api key and secret, how can i get the Ed25519 key?
https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/request-security#signed-request-example-ed25519
Hi all! What is the average waiting time to receive EUR:
-on binance account after SEPA instant deposit?
-on bank account after withdrawal?
so theres no market data endpoint thats just read only?
even the market data is illegal lol?
im trying to locally access the https://fapi.binance.com/fapi/v1/premiumIndex endpoint in the US
is that not possible since I just wanna grabt the funding rate for btc but I dont see any us variant IP.
No problem, glad I could help and clarify on it =)
Feel free to use any of our libraries, for example our python library has the function integrated already:
https://github.com/binance/binance-connector-python/blob/master/examples/spot/trade/new_oco_order.py
Table is here:
https://developers.binance.com/docs/binance-spot-api-docs/faqs/trailing-stop-faq
Why the 200? Trailing delta is a percentage, it will start trailing based on stopPrice.
If you want it to start trailing at price point of 200, than you would do:
"aboveStopPrice: "200"
"aboveTrailingDelta": % you want to trail
Firstly you'd need to use an OCO order:
https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#order-listsPOST /api/v3/orderList/oco
Since you're trying to place your SL as a plain SL, and your TP as a trailing TP. In your case you'd need to establish one of the two orders at STOP_LOSS/STOP_LOSS_LIMIT and the other as TAKE_PROFIT/TAKE_PROFIT_LIMIT
Without the limit, that means that when the stop price is reached, you'll execute at market price. If you add limit, your order will execute at the limit price once the stop price is reached.
Keep this in account:
Price restrictions
If the OCO is on the SELL
side:LIMIT_MAKER/TAKE_PROFIT_LIMIT
price
> Last Traded Price > STOP_LOSS/STOP_LOSS_LIMIT
stopPrice
TAKE_PROFIT stopPrice
> Last Traded Price > STOP_LOSS/STOP_LOSS_LIMIT stopPrice
Now lastly, if you want an example of how you'd define for example the TP leg, you could do:
params = {
"symbol": "BNBUSDT",
"side": "SELL",
"quantity": 1,
"aboveType": "TAKE_PROFIT",
"belowType": "STOP_LOSS",
"aboveStopPrice: "600",
"aboveTrailingDelta": 2,
"belowStopPrice": 580,
}
This is considering using stop_market orders, if you want to use stop_limit than need to add the price (as defined in the docs shared above).
In this scenario, when BNBUSDT reaches 600 it will place a TP order that starts running the trailing at 2% ; If the price reaches 580 it places a stop order that will executed at market price.
Hope this helps.
-admin
for what it's worth (it might be useful to someone) I was using a StringContent formated as a queryUrl in my post requests (which works fine for spot api) but with sapi a FormUrlEncodedContent was needed... as said in the doc 😅
Читать полностью…We haven't received reply on this yet, will forward it once more to the relevant teams. It may take a few business days, we appreciate the patience.
Читать полностью…You don't need to be VIP lvl 4 to get access to sapi / margin trading. All regular users (so long as jurisdiction allows it) can trade on margin.
Here's the example of placing a margin order:
https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-Order
Only needs the spot/margin permissions
-admin