EZXT - A ccxt wrapped client for binance & ftx

Overview

EZXT

Open source & beginner-friendly ccxt wrapped client for binance & ftx


Want to contact me ? 👋

https://discord.gg/wfpGXvjj9t

Want to support my work ? 💰

  • paypal: [email protected]
  • usdt (ERC20): 0x17B516E9cA55C330B6b2bd2830042cAf5C7ecD7a
  • btc: 34vo6zxSFYS5QJM6dpr4JLHVEo5vZ5owZH
  • eth: 0xF7f87bc828707354AAfae235dE584F27bDCc9569

thanks if you do it 💖

What's EZXT ? 📈

EZXT is a simple client to interact with ftx and binance using ccxt

Dependencies :
  • Pandas
  • Numpy
  • ccxt

Doc 📝


Initialisation

Client(exchange, api_key=None, api_secret=None, subaccount=None))
Required parameters:
  • exchange: ccxt.binance or ccxt.ftx
Optional parameters:
  • api_key: your api key
  • api_secret: your api secret
  • subaccount: your sub-account's name if you're using ftx

get_bid & get_ask

client.get_ask(market))
client.get_bid(market))
Required parameters:
  • market: the market you want to get the bid/ask for as a string. Example: "BTC/USDT"

post_market_order & post_limit_order & post_take_profit & post_stop

client.post_market_order(market, side, amount)
client.post_limit_order(market, side, amount, price)
client.post_take_profit(market, side, amount, price)
client.post_stop(market, side, amount, price)
Required parameters:
  • market: the market you want to post an order for as a string. Example: "BTC/USDT"
  • side: "buy" or "sell"
  • amount: the amount you want to buy/sell as a float. /!\ Use get_buy_size or get_sell_size functions to avoid errors.
  • price: with post_limit_order, post_take_profit and post_stop, the price of the order as a float.

cancel_order

client.cancel_order(order)
Required parameters:
  • order: the order you want to cancel as a dict returned by get_order or get_all_orders methods.

get_free_balance

client.get_free_balance(market)
Required parameters:
  • market: the market you want to get the free balance for as a string. Example: "BTC/USDT"

get_klines

client.get_klines(market, interval, limit)
Required parameters:
  • market: the market you want to get the klines for as a string. Example: "BTC/USDT"
  • interval: the interval you want to get the klines for as a string. Example: "1m" or "1d"
  • Optional parameters:
  • limit: the number of klines you want to get as an int. By default it's 100.

get_market return some market information

client.get_market(market)
Required parameters:
  • market: the market you want to get the market data for as a string. Example: "BTC/USDT"

get_precision return the precision of the market

client.get_precision(market)
Required parameters:
  • market: the market you want to get the precision for as a string. Example: "BTC/USDT"

get_buy_size return the size of your order properly to avoid errors

client.get_buy_size(market, amount)
Required parameters:
  • market: the market you want to get the buy size for as a string. Example: "BTC/USDT"
  • amount: the amount in percent you want to buy of your wallet as an int or a float: Example If you have 1000 usdt, and you enter 50 it will return approximately 500
Optional parameters:
  • price: if you will make a limit order, specify the price of your order as an int or a float.
  • free_currency_balance: If you fill it the function will use this amount instead of check your free balance to calculate the size, Example: you can enter 350 on this parameter and 100 on amount parameter, it will return a size of approximately 350. If you're trading BTC/USDT enter the usdt amount.

get_sell_size return the size of your order properly to avoid errors

client.get_sell_size(market, amount)
Required parameters:
  • market: the market you want to get the buy size for as a string. Example: "BTC/USDT"
  • amount: the amount in percent you want to buy of your wallet as an int or a float: Example If you have 1000 usdt, and you enter 50 it will return approximately 500
Optional parameters:

/!\ There is no price parameter even if you will make a limit order.

  • free_currency_balance: If you fill it the function will use this amount instead of check your free balance to calculate the size, Example: you can enter 350 on this parameter and 100 on amount parameter, it will return a size of approximately 350. If you're trading BTC/USDT enter the btc amount.

get_order return the order you want

client.get_order(order_id)
Required parameters:
  • order_id: the id of the order you want to get as an int.

get_all_orders return all your orders as a list

client.get_all_orders()
Optional parameters:
  • market: the market you want to get the orders for as a string. Example: "BTC/USDT".
  • open_only: True if you want to get only open orders.

get_order_status return the status of your order, canceled, filled, or open

client.get_order_status(order_id)
Required parameters:
  • order_id: the id of the order you want to get as an int.

Some examples, dm me for more

import math
import ccxt
import pandas as pd
from EZXT import Client

binance_client = Client(ccxt.binance, "api_key", "api_secret")
ftx_client = Client(ccxt.ftx, "api_key", "api_secret")
client = Client(ccxt.binance)

# return ask price of btc/usdt
client.get_ask("BTC/USDT")

# Post a market buy order of 50% of my wallet
size = ftx_client.get_buy_size("BTC/USDT", 50)
ftx_client.post_market_order("BTC/USDT", size, "buy")

# Post a limit sell order of 30 bitcoins
size = ftx_client.get_sell_size("BTC/USDT", 100, 30)
ftx_client.post_limit_order("BTC/USDT", "sell", size, 60000)
You might also like...
This is a cryptocurrency trading bot that analyses Reddit sentiment and places trades on Binance based on reddit post and comment sentiment. If you like this project please consider donating via brave. Thanks.

This is a cryptocurrency trading bot that analyses Reddit sentiment and places trades on Binance based on reddit post and comment sentiment. The bot f

Monitor your Binance portfolio

Binance Report Bot The intent of this bot is to take a snapshot of your binance wallet, e.g. the current balances and store it for further plotting. I

a simple python script that monitors the binance hotwallet and refunds the withdrawal fee to encourage people to withdraw their Nano and help decentralisation

Nano_Binance_Refund_Bot a simple python script that monitors the binance hotwallet and refunds the withdrawal fee to encourage people to withdraw thei

Binance leverage futures Hook

Simple binance futures Attention Just use leverage. The fee difference between futures and spot is not considered. For example, funding rate, etc. Onl

A muti pairs martingle trading bot for Binance exchange.

multi_pairs_martingle_bot English Documentation A muti pairs martingle trading bot for Binance exchange. Configuration { "platform": "binance_futur

Bot for automated buying boxes on Binance

V 1.0 Bot for automated buying boxes on Binance В settings.py выставляем свои COOKIE и свой CSRFTOKEN В settings.py для headers выставляем свои параме

Trading through Binance's API using Python & sqlite

pycrypt Automate trading crypto using Python to pull data from Binance's API and analyse trends. May or may not consistently lose money but oh well it

This is a crypto trading bot that scans the Binance Annoucements page for new coins, and places trades on Gateio
This is a crypto trading bot that scans the Binance Annoucements page for new coins, and places trades on Gateio

gateio-trading-bot-binance-announcements This Gateio x Binance cryptocurrency trading bot scans the Binance Announcements page and picks up on new coi

A new coin listing alert bot using Python, Flask, MongoDB, Telegram API and Binance API
A new coin listing alert bot using Python, Flask, MongoDB, Telegram API and Binance API

Bzzmans New Coin Listing Detection Bot Architecture About Project Work in progress. This bot basically gets new coin listings from Binance using Binan

Owner
Shaft
A french student who enjoy spend time on his projects. I'm interested into blockchain, DeFi, cybersecurity and cryptography. I use Python, Java, C++, js
Shaft
Andrei 1.4k Dec 24, 2022
Aio-binance-library - Async library for connecting to the Binance API on Python

aio-binance-library Async library for connecting to the Binance API on Python Th

GRinvest 10 Nov 21, 2022
FTX auto lending bot with python

FTX auto lending bot Get the API key Check my article for step by step + screenshots Setup & Run Install python 3 Install dependency pip install -r re

Patompong Manprasatkul 1 Dec 24, 2021
BT CCXT Store

bt-ccxt-store-cn backtrader是一个非常好的开源量化回测平台,我自己也时常用它,backtrader也能接入实盘,而bt-ccxt-store就是帮助backtrader接入数字货币实盘交易的一个插件,但是bt-ccxt-store的某些实现并不是很好,无节制的网络轮询,一些

moses 40 Dec 31, 2022
Binance Futures Client

Binance Futures Client

null 4 Aug 2, 2022
A Telegram bot for remotely managing Binance Trade Bot

Binance Trade Bot Manager Telegram A Telegram bot for remotely managing Binance Trade Bot. If you have feature requests please open an issue on this r

Lorenzo Callegari 乐子睿 350 Jan 1, 2023
A python API for BSCScan (Binance Smart Chain Explorer), available on PyPI.

bscscan-python A complete Python API for BscScan.com, available on PyPI. Powered by BscScan.com APIs. This is a gently modified fork of the etherscan-

Panagiotis Kotsias 246 Dec 31, 2022
Terminal-Trade(Panel API) For Binance

Binance-Trade-Project Binance Futures Terminal-Trade(API) & Binance This Project Worth Around 500 Bucks. **I Did This Project For SomeOne And He

Cyber 9 Dec 30, 2021
PancakeTrade - Limit orders and more for PancakeSwap on Binance Smart Chain

PancakeTrade helps you create limit orders and more for your BEP-20 tokens that swap against BNB on PancakeSwap. The bot is controlled by Telegram so you can interact from anywhere.

Valentin Bersier 187 Dec 20, 2022