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
An API which returns random AOT quote everytime it's invoked

An API which returns random AOT quote everytime it's invoked

Nishant Sapkota 1 Feb 07, 2022
Telegram bot to stream videos in telegram Voice Chat for both groups and channels

Telegram bot to stream videos in telegram Voice Chat for both groups and channels. Supports live steams, YouTube videos and telegram media. Supports scheduling streams, recording and many more.

Akki ThePro 2 Sep 11, 2022
Powerful Telegram bot to countdown to your important events in any group chat.

Powerful Telegram bot to countdown to your important events in any group chat. Live countdown timer.

118 Dec 30, 2022
A Telegram Userbot to play or streaming Audio and Video songs / files in Telegram Voice Chats.

Vcmusic-Userbot A Telegram Userbot to play or streaming Audio and Video songs / files in Telegram Voice Chats. It's made with PyTgCalls and Pyrogram R

3 Oct 23, 2021
A Python library for loading data from a SpaceX Starlink satellite.

Starlink Python A Python library for loading data from a SpaceX Starlink satellite. The goal is to be a simple interface for Starlink. It builds upon

Austin 2 Jan 16, 2022
Send pm to Admin - Telegram

Send pm to Admin - Telegram

Ahoora 3 Nov 17, 2022
A simple python script to send files into your telegram Bot form your PC, Server etc.

telegramSend A simple python script to send files into your telegram Bot form your PC, Server etc. How to Use Install requirements.txt pip3 install -r

Ajay Kumar Tekam 1 Jul 19, 2022
VoiceMaster-Discord-Bot - Fork from original Discord bot with max channel limit, staff role and more

VoiceMaster VoiceMaster is a discord bot created to change the way servers work,

2 Feb 28, 2022
A python library for creating Slack slash commands using AWS Lambda Functions

slashbot Slashbot makes it easy to create slash commands using AWS Lambda functions. These can be handy for creating a secure way to execute automated

Eric Brassell 17 Oct 21, 2022
This is a walkthrough about understanding the #BoF machine present in the #OSCP exam.

Buffer Overflow methodology Introduction These are 7 simple python scripts and a methodology to ease (not automate !) the exploitation. Each script ta

3isenHeiM 53 Dec 08, 2022
Stackoverflow Telegram Bot With Python

Template for Telegram Bot Template to create a telegram bot in python. How to Run Set your telegram bot token as environment variable TELEGRAM_BOT_TOK

PyTopia 10 Mar 07, 2022
This is new discord nitro generator for discord

Hello! This is new discord nitro generator for discord. If you want use it, To generator i added checker for no seraching generator and checker. This tool maked by .

ItzBolt 1 Jan 16, 2022
A virus/stealer made in py

python-virus A virus/stealer made in py. Features: Discord token stealer, Password stealer, Windows key stealer, Credit-card stealer, Image grab, Anti

SKYNETMARCI 5 Dec 12, 2022
TORNADO CASH Proxy Pancakeswap Sniper BOT 2022-V1 (MAC WINDOWS ANDROID LINUX)

TORNADO CASH Pancakeswap Sniper BOT 2022-V1 (MAC WINDOWS ANDROID LINUX) ⭐️ A ful

Crypto Trader 1 Jan 06, 2022
Bulk NFT uploader to OpenSea!

Bulk NFT Uploader Description Simple easy peasy python script which logins to opensea account using metamask and bulk uploads NFT to your default coll

Lakshya Khera 25 May 23, 2022
Automate and Manage Telegram Channels

Channel Automation Bot @ChannelAutomateBot A star ⭐ from you means a lot to us! Telegram bot to automate and manage channels. Usage Deploy to Heroku T

Stark Bots 61 Dec 29, 2022
Automatically commits and pushes changes from a specified directory to remote repository

autopush a simple python program that checks a directory for updates and automatically commits any updated files (and optionally pushes them) installa

carreb 1 Jan 16, 2022
Visualize size of directories, s3 buckets.

Dir Sizer This is a work in progress, right now consider this an Alpha or Proof of Concept level. dir_sizer is a utility to visualize the size of a di

Scott Seligman 13 Dec 08, 2022
Telegram bot untuk mencari jawaban dibrainly, support inline juga

Brainly-Telebot Bot Untuk Mencari Jawaban Dibrainly Jika ingin clone. Boleh kok Dibuat dengan python menggunakan MTproto Library. Yaitu Pyrogram Bot y

... 7 Mar 17, 2022
Best badge generator API to count visitors of your Repository / Account 🥇

github visitors badge A badge generator service to count visitors of your markdown file. Hello every one! In this post, I will tell you the story of m

Sᴇɴᴜ Gᴀᴍᴇʀ Bᴏʏ 〽 3 Dec 11, 2021