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
Discord Token Generator - Python (Generates Tokens and Joins your Server Automatically) hCaptcha Bypass **FREE**

Best Discord Token Generator {hCaptcha bypass FREE Unlimited Memberboost} Install few requirements & run main.py it will redirect you to the Download

1 Oct 27, 2021
对hermit 的API进行简单的封装,做成了这个python moudle

hermit-py 对hermit 的API进行简单的封装,做成了这个Python Moudle,推荐通过wheel的方式安装。 目前对点击、滑动、模拟输入、找组件、等支持较好,支持查看页面的实时布局信息,再通过布局信息进行点击滑动等操作。 支持剪贴板相关的操作,支持设置剪贴的任意语言内容。

LookCos 40 Jun 25, 2022
A simple discord bot written in python which can surf subreddits, send a random meme, jokes and also weather of a given place

A simple Discord Bot A simple discord bot written in python which can surf subreddits, send a random meme, jokes and also weather of a given place. We

1 Jan 24, 2022
ClearML - Auto-Magical Suite of tools to streamline your ML workflow. Experiment Manager, MLOps and Data-Management

ClearML - Auto-Magical Suite of tools to streamline your ML workflow Experiment Manager, MLOps and Data-Management ClearML Formerly known as Allegro T

ClearML 3.9k Jan 01, 2023
An hcaptcha-solving discord account generator; capable of randomizing names, profile pictures, and verifying phone numbers.

discord-account-generator An hcaptcha-solving discord account generator; capable of randomizing names, profile pictures, and verifying phone numbers.

Acier 61 Dec 10, 2022
A Python library for inserting an reverse shell attached to Telegram in any Python application.

py tel reverse shell the reverse shell in your telgram! What is this? This program is a Python library that you can use to put an inverted shell conne

Torham 12 Dec 28, 2022
Telegram-Discord Bridge

imperial-toilet Скрипт, пересылающий сообщения из нескольких каналов Telegram в один/несколько каналов Discord. Технически это Telegram-юзербот и Disc

1 Jan 17, 2022
Proxy-Bot - Python proxy bot for telegram

Proxy-Bot 🤖 Proxy bot between the main chat and a newcomer, allows all particip

Anton Shumakov 3 Apr 01, 2022
This bot will pull a stream of tweets based on rules you set and automatically reply to them.

Twitter reply bot This bot will pull a stream of tweets based on rules you set and automatically reply to them. I built this bot in order to help comb

Brains 1 Feb 13, 2022
Code done for/during the course

Serverless Course Autumn 2021 - Code This repository contains a set of examples developed during, but not limited to the live coding sessions. Lesson

Alexandru Burlacu 4 Dec 21, 2021
eBay Scraper Homework 3 With Python

eBay Scraper Homework 3 Description of Code My ebay-dl.py file is programmed with python to download 6 key pieces of information - name, if there are

1 Nov 10, 2021
A python wrapper for interacting with the LabArchives API.

LabArchives API wrapper for Python A python wrapper for interacting with the LabArchives API. This very simple package makes it easier to make arbitra

Marek Cmero 3 Aug 01, 2022
This repository contains unofficial code reproducing Agent57

Agent57 This repository contains unofficial code reproducing Agent57, which outp

19 Dec 29, 2022
Get Notified about vaccine availability in your location on email & sms ✉️! Vaccinator Octocat tracks & sends personalised vaccine info everday. Go get your shot ! 💉

Vaccinater Get Notified about vaccine availability in your location on email & sms ✉️ ! Vaccinator Octocat tracks & sends personalised vaccine info ev

Mayukh Pankaj 6 Apr 28, 2022
YARSAW is an Async Python API Wrapper for the Random Stuff API.

Yet Another Random Stuff API Wrapper - YARSAW YARSAW is an Async Python API Wrapper for the Random Stuff API. This module makes it simpler for you to

Bruce 6 Mar 27, 2022
Senexia - A powerful telegram bot to manage your groups as effectively as possible

⚡ Kenechi bot ⚡ A Powerful, Smart And Simple Group Manager ... Written with AioG

Akhi 2 Jan 11, 2022
企业微信消息推送的python封装接口,让你轻松用python实现对企业微信的消息推送

👋 corpwechat-bot是一个python封装的企业机器人&应用消息推送库,通过企业微信提供的api实现。 利用本库,你可以轻松地实现从服务器端发送一条文本、图片、视频、markdown等等消息到你的微信手机端,而不依赖于其他的第三方应用,如ServerChan。 如果喜欢该项目,记得给个

Chaopeng 161 Jan 06, 2023
Currency And Gold Prices - Currency And Gold Prices For Python

Currency_And_Gold_Prices Photos from the app New Update Show range Change better

Ali HemmatNia 4 Sep 19, 2022
This is my Discord-Bot named priamoryki-bot based on python.

This is my Discord-Bot named priamoryki-bot based on python. It's a public repository without private information, so you need to correct some code for everything to be working.

priamoryki 2 Dec 14, 2022
vk.com API python wrapper

Python vk.com API wrapper This is a vk.com (the largest Russian social network) python API wrapper. The goal is to support all API methods (current an

Dmitry Voronin 371 Dec 29, 2022