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)
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
To dynamically change the split direction in I3/Sway so as to split new windows automatically based on the width and height of the focused window

To dynamically change the split direction in I3/Sway so as to split new windows automatically based on the width and height of the focused window Insp

Ritin George 6 Mar 11, 2022
A simple waybar module to display the status of the ICE you are currently in using the ICE Portals JSON API.

waybar-iceportal A simple waybar module to display the status of the ICE you are currently in using the ICE Portals JSON API. Installation Ensure pyth

Moritz 7 Aug 26, 2022
A fork of lavalink.py built for nextcord

nextcord-ext-lava is a wrapper for Lavalink which abstracts away most of the code necessary to use Lavalink, allowing for easier integration into your projects, while still promising full API coverag

nextcord-ext 4 Feb 27, 2022
Posts locally saved videos to the desired subreddit

redditvideoposter posts locally saved videos to the desired subreddit ================================================================= STEPS: pip ins

Kyrus 2 Dec 01, 2021
A Telegram Bot to manage your music channel with some cool features.

Music Channel Manager V2 A Telegram Bot to manage your music channel with some cool features like appending your predefined username to the musics tag

11 Oct 21, 2022
Python wrapper to simplify calls to AncestryDNA API.

AncestryDNA API wrapper Ancestry exposes an undocumented REST API for its DNA features. This Python wrapper inventories the available calls, and expos

Matt 2 Jun 10, 2022
Fastest Pancakeswap Sniper BOT TORNADO CASH 2022-V1 (MAC WINDOWS ANDROID LINUX)

Fastest Pancakeswap Sniper BOT TORNADO CASH 2022-V1 (MAC WINDOWS ANDROID LINUX) ⭐️ AUTO BUY TOKEN ON LAUNCH AFTER ADD LIQUIDITY ⭐️ ⭐️ Support Uniswap

Crypto Trader 7 Jan 31, 2022
A Telegram user bot to count telegram channel subscriber or group member.

Subscriber Count Userbot A Telegram user bot to count telegram channel subscriber or group member. This tool is only for educational purpose. You coul

IDNCoderX 8 Nov 30, 2022
Grocy-create-product - A script supports the batch creation of new products in Grocy

grocy-create-product This script supports the batch creation of new products in

André Heuer 6 Jul 28, 2022
Discord bot that manages expiration of roles with subscriptions!

Discord bot that manages expiration of roles with subscriptions!

Chakeaw__ 3 Apr 28, 2022
GUI Pancakeswap V2 and Uniswap V3 trading client (and bot) MOST ADVANCE TRADING BOT SUPPORT WINDOWS LINUX MAC (BUY TOKEN ON LAUNCH)

GUI Pancakeswap 2 and Uniswap 3 SNIPER BOT 🏆 🥇 (MOST ADVANCE TRADING BOT SUPPORT WINDOWS LINUX MAC) (AUTO BUY TOKEN ON LAUNCH AFTER ADD LIQUIDITY) S

HYDRA 16 Dec 22, 2021
Asynchronous RDP/VNC client for Python (GUI)

🚩 This is the public repository of aardwolf, for latest version and updates please consider supporting us through https://porchetta.industries/ AARDW

29 Dec 15, 2022
New discord token grabber, password and general information

New discord token grabber, password and general information

Monstered 6 Nov 09, 2022
Heroku app to explore boardgame data

A Dashboard for the Board Game Geeks among us Link to Application As many Board Game Geeks like myself track the scores of board game matches I decide

Maarten Grootendorst 20 Nov 23, 2022
a translator bot for discord

TranslatorBOT it is a simple and powerful discord bot, it been used for translating includes more than 100 language, it has a lot of integrated comman

Mear. 2 Feb 03, 2022
A Advanced Auto Filter Bot Which Can Be Used In Many Groups With Multiple Channel Support....

Adv Auto Filter Bot This Just A Simple Hand Auto Filter Bot For Searching Files From Channel... Just Sent Any Text I Will Search In All Connected Chat

Albert Einstein 33 Oct 21, 2022
Pycord, a maintained fork of discord.py, is a python wrapper for the Discord API

pycord A fork of discord.py. PyCord is a modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Mo

Pycord Development 2.3k Dec 31, 2022
A powerful bot to copy your google drive data to your team drive

⚛️ Clonebot - Heroku version ⚡ CloneBot is a telegram bot that allows you to copy folder/team drive to team drives. One of the main advantage of this

MsGsuite 269 Dec 23, 2022
Unarchive Bot for Telegram

Telegram UnArchiver Bot UnArchiveBot: 🇬🇧 Bot that allows you to extract supported archive formats in telegram. 🇹🇷 Desteklenen arşiv biçimleri tele

Hüzünlü Artemis [HuzunluArtemis] 25 May 07, 2022
Cdk-python-crud-app - CDK Python CRUD App

Welcome to your CDK Python project! You should explore the contents of this proj

Shapon Sheikh 1 Jan 12, 2022