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
Amazon AWS Web Tool (view only)

Amazon AWS Web Tool (AAWT) discontinued Features Cloudfront (simple) EC2 (With Charts and Prices) EC2 Reserved EBS ELB (With Charts) Obs:. only classi

Carlos Augusto Malucelli 9 Nov 07, 2022
Fast IP address lookup

ipscoop Fast IP Scoop Table of Contents Installation CLI Getting Started Ref Installation To install ipscoop, simply: $ python3 -m pip install -U git+

6 Mar 16, 2022
WhatsApp API Python ChatBot

WhatsApp Api Python - Esta documentação tem como objetivo exemplificar o uso do Moorse Whatsapp API na linguagem Python.

Douglas Alves 2 Jan 06, 2022
Gets instagram public username and returns usefull informations like profilepic(b64), video_urls etc.

InstaSucker Gets instagram public username and returns usefull informations like profilepic(b64), video_urls etc. Information this project contains a

Armin Amiri 5 Apr 30, 2022
Python Client for Yandex Cloud Logging

Python Client for Yandex Cloud Logging Installation pip3 install python-yandex-cloud-logging Creating a Yandex Cloud Logging Group yc logging group c

MCode 0 Dec 08, 2021
An API wrapper for Discord written in Python.

HCord A fork of discord.py project. HCord is a modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Featu

HCord 0 Jul 30, 2022
My beancount practice as a template

my-beancount-template 个人 Beancount 方案的模板仓库 相关博客 复式记账指北(一):What and Why? 复式记账指北(二):做账方法论 复式记账指北(三):如何打造不半途而废的记账方案 配置 详细配置请参考博客三。必须修改的配置有: Bot功能:data/be

KAAAsS 29 Nov 29, 2022
⬇️ Telegram Bot to download TikTok videos without watermark in a snap with Inline mode support.

⬇️ Tokmate - Telegram Bot to download TikTok videos ⛲ Features Superfast and supports all type of TikTok links Download any TikTok videos without mate

Hemanta Pokharel 35 Jan 05, 2023
This automation protect against subdomain takeover on AWS env which also send alerts on slack.

AWS_Subdomain_Takeover_Detector Purpose The purpose of this automation is to detect misconfigured Route53 entries which are vulnerable to subdomain ta

Puneet Kumar Maurya 8 May 18, 2022
Intelligent Trading Bot: Automatically generating signals and trading based on machine learning and feature engineering

Intelligent Trading Bot: Automatically generating signals and trading based on machine learning and feature engineering

Alexandr Savinov 326 Jan 03, 2023
Python Bot that attends classes, answers polls, and then again waits for classes to start.

LPU_myclass_Bot LPU_myclass_Bot is a Python bot that waits for class to start, attends class, answers polls, and then again waits for another class to

Saurabh Kumar 6 Apr 07, 2022
Tiktok 2 Instagram With Python

Tiktok2Instagram 📸 About The Project What it does: Download the source video from a user inputted Tiktok URL. 📙 Add audio to the Tiktok video from a

Carter Belisle 4 Feb 06, 2022
Python library for Seeedstudio Grove devices

grove.py Python library for Seeedstudio Grove Devices on embeded Linux platform, especially good on below platforms: Coral Dev Board (Wiki) NVIDIA Jet

Seeed Studio 123 Dec 17, 2022
ESOLinuxAddonManager - Very simple addon manager for Elder Scrolls Online running on Linux.

ESOLinuxAddonManager Very simple addon manager for Elder Scrolls Online running on Linux. Well, more a downloader for now. Currently it's quite ugly b

Akseli 25 Aug 28, 2022
Replace sequence_IDs in gff3 based on given genome.fasta

gff-rename Replace the sequence IDs in a gff3 file with a set of provided sequence IDs from a genom.fasta. This is useful when a gff3 file is retrieve

tolkit 1 Nov 12, 2021
A mass creator for Discord's new channel threads.

discord-thread-flooder A mass creator for Discord's new channel threads. (obv created by https://github.com/imvast) Warning: this may lag ur pc if u h

Vast 6 Nov 04, 2022
A self-bot for discord, written in Python, which will send you notifications to your desktop if it detects an intruder on your discord server

A self-bot for discord, written in Python, which will send you notifications to your desktop if it detects an intruder on your discord server

LevPrav 1 Jan 11, 2022
Neofetch/pfetch, but for weather

Wfetch Neofetch/pfetch, but for weather Features Information about the weather outside: Weather condition Temperature Humidity Pressure Wind Sunrise-s

G_cat 72 Nov 18, 2022
Python client library for Bigcommerce API

Bigcommerce API Python Client Wrapper over the requests library for communicating with the Bigcommerce v2 API. Install with pip install bigcommerce or

BigCommerce 81 Dec 26, 2022
Yandex OSINT tool

YaSeeker Description YaSeeker - an OSINT tool to get info about any Yandex account using email or login. It can find: Fullname Photo Gender Yandex UID

HowToFind 110 Jan 03, 2023