Ethereum: How to Adjust Open Position Size via Binance API Without Closing Position (Using Python)?


Sadjusting an open position Create API by closing posing **

As for the Python developer who works with Binance’s API, you are like a Vitar family with the concept of surviving bots. At Tint Art, we will study how to just add the size of an open position using the Binance API with a citation that close the position.

Underestimation of position szes

Before you immerse yourself in adding ownership sizes, let’s understand how work:

A
Passing service
Unfortunately from cryptocurrency (eg Ether or Bitcoin) you are ready to take the risk of trading.

Commercial SZE * Chair for exchange of exchange of incorporation in trade.

Resident Create a Selio survey ** Determination of the ratio of trade size to possession of size.

For the exam, the position illustration is 100 ETH, and rats with Rails 1:10 trade size, risk of YOLL 10 Eton Each trade, with a total trade amount of 100 ETH.

Setting an API to open position *

To adjust the size of the open position, we can use the Postition.Update () method to change the exam. Sher on Python Code SNiPt SniPt SNiPTs demonstrations.

`comfort

work

#Liper Binnature

ap = binship.cl fromded_ap ()

Replace your API concerts and a secret key

Clots climate_id = “your_client_id”

Climate_Seret = “your_clilclitClitClitClitcitc”

Set the size of possession for vein 0 and 100

Pospion_size = 20.0

New positions

opponents = bee_positions ()

International through the position of opening

For the occupation of opponents:

Check position (ie not clock)

Selected Possion.Stuts = = “Ctive”:

Update the size of possession using Binance API

Clots climate_id = “your_client_id”

Climate_Seret = “your_clilclitClitClitClitcitc”

Apicits.up (Position_Size: Round (Position_Size * 100)}

Prit Send to confirm updates

Print (“Open possessions updated successful!”)

“ s

Snopent code provided:

1

  • We define the amount of the initiative as a specified vein 0 and 100.

  • We have given the currency to the currency of the prophecy method (select).

  • We order through an open position, checking that it is active (ie it is not clocking).

  • Information is found, we will update the amount of possession by catalyzing the Packaging () method with a new value of the specified Simided corporate parameter.

Tips and Variats

  • To avoid closing possessions without updates, Sup

  • You can use the ALO USE OFTHERE.UPDATE () method with a wit of addictions, pay limits, STOP_PRICE ‘, ortake_profit_price, depending on your trade.

  • Keep in mind that Shou overshadow the open possession is still stationary and not closed. If you poses closed, there will be no effect to update the size of S.

Following this article and adapting the sense of your certain requirements, you will be able to effectively adjust the size of the positions that increase your size possessions. Happy trade!


Leave a Reply

Your email address will not be published. Required fields are marked *