0% found this document useful (0 votes)
77 views1 page

Python Bot Code

The document contains Python code for executing trades on the Binance exchange using the CCXT library. It includes API keys for authentication, initializes the Binance client, and defines a function to execute trades for the DOGE/USDT pair. An example trade execution is provided, which can be modified as needed.

Uploaded by

amsshk1993
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views1 page

Python Bot Code

The document contains Python code for executing trades on the Binance exchange using the CCXT library. It includes API keys for authentication, initializes the Binance client, and defines a function to execute trades for the DOGE/USDT pair. An example trade execution is provided, which can be modified as needed.

Uploaded by

amsshk1993
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

import ccxt

# Binance API Keys


[binance]
api_key = 0lzHG5f5cZ66xSwu6MsW23abT6IyglffDiqfk4BBh2gamJaXNwtTvqX2jRj92SDn
api_secret = z3r3EztFTso3iJm52oLETap9dIXxAFznabpnwW2AbDkmgzM47p6CrijZCzAv7te9

# Initialize Binance client


exchange = ccxt.binance({
'apiKey': API_KEY,
'secret': API_SECRET,
'options': {'defaultType': 'spot'}
})

# Execute trade
def execute_trade(side, price, qty):
order = exchange.create_order(
symbol="DOGE/USDT",
type="LIMIT",
side=side,
amount=qty,
price=price
)
print(f"Trade executed: {order}")

# Example trade execution (Modify as needed)


execute_trade("buy", 0.07, 100)

You might also like