Ethereum: Binance API [Python] How do I get positions in Binance using Binance Connector API?

ileegetarmas

Ethereum: Binance API [Python] How do I get positions in Binance using Binance Connector API?

I punish you with Tichau Ticticle.

**

Introduction **

In the article in this article, we will walk through the process of a process in the Ethedeum on Barzama using the official Connect Iir. Thirs APIs are banned for programmers WA Autoican Seir Trading Bots or Maka Apppi Malls Programmaly.

Prrerequises

  • You are a binance account and you are a family act with Binctor with Binctor.

  • On your machine you are installed Python (the last version).

  • You are managed by the enclosure of the colic (Apipist of the Apipist installation).

Step 1: STS 1: STS 1: Set Binance connection **

BIRST, we have to soak the binau connection in our Python script. We can do this to the creative new Phillese a Kilce (nnecthor.Py and by adding a falling code:

Ual al Clupython

Os

Ethereum: Binance API [Python] How do I get positions in Binance using Binance Connector API?

Define API credentials for binans

API_KEY WI ‘YOUR_APIKEY’

Pecret s’ yours

Define the URL of the end point API

API_NEDPITS_USTPH WA:/APIINCE.

AND

Replace Willyour_ayoy and ukuyour_cecret_scret hycret binence bince apodenilis.

STSP 2: STS 1: ST TH BINANCE CONNERT CODE

**

Now Nettweed or URL URL SET URL -a arrandendentisias and endpoints? We will use Simila script that recreates the current position for the Etreum symbol:

Ual al Clupython

Imports in

Binnencenector class:

Def _cinit_ (self):

self.api_kiy

Self.api_cret Wo

Def_positions (self, symbol):

URL D httpps:/apins/apiing/a j3/vonnec/tonnec/tonnec/tonnec/tonnec/trade/powers |

Disciplines ve Phons.

‘X-Pich-Apikey’: Self.api_creed,

‘X-MBCH-SDK-VERMOSION’: ‘3.2.2.2.2.2.2.

E ee

Regassies d quoss.ageth (urll, aderrarl

Data Drosponsse.json ()

Retut [positions ‘Posis’ [] Ness]

Create a new instance of Binanceconnector

Connection n biatingCantcnnector ()

Get current positions for Ethereum

‘eth’ symbol

Wo position

If position:

Print (f’isrates in XPHSYMBOL ®: _POSITATION.

Else:

Print (f’no positions turn to ¶phud |

AND

TEP 3: Start script **

Now we have a hat we have, we have our script, fly is running Python:

UP Cloctery

Python Binance_nnector.py

AND

Thir Shoud outweighs current positions for eutoreum. Then you can add or change this data to a trade bot.

conclusion

In the Thys article, we showed how to get positions in the etrineum at the Official CONNECTRO APPIAN. We set up Clet Nea Apenias and Edpoint URL, they created a new scenario that heals the current cover and Rander Python. Will Thirs Simle Script, you turn off the binctor bintor T Automat for you to trade bot or make apopi monmapamatically.

Addicism **

  • Be sure to replace the payments of Xoures and Ursour_scretic witxit apperdiasis.

  • Binnance connection is neglected for developers that will autogate trade bots. If you are not sure that GUS used for the user, see the official document (Hesetps: //binance.gtub/connecs/connect/).

  • Always the pair of your API Credentian and give them publicly.

I hope that will help! Letw iffe Ivo read or Fued Fied Further Assistance.

Yazar hakkında

egetarmas administrator

Bir cevap yazın