All Projects → bogdanteodoru → py3cw

bogdanteodoru / py3cw

Licence: MIT license
Unofficial wrapper for the 3Commas API written in Python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to py3cw

AppImageUpdater
AppImage Updater for Humans built with QML/C++ with Qt5 ❤️.
Stars: ✭ 31 (-64.77%)
Mutual labels:  unofficial
bunq2ifttt
bunq2IFTTT creates a self-hosted interface between the bunq banking API and IFTTT.
Stars: ✭ 20 (-77.27%)
Mutual labels:  unofficial
java-binance-api
Java Binance API Client
Stars: ✭ 72 (-18.18%)
Mutual labels:  wrapper-api
teams-api
Unofficial Microsoft Teams Library
Stars: ✭ 92 (+4.55%)
Mutual labels:  unofficial
Vermintide-Mod-Framework
An open-source, community-run framework that provides enhanced Vermintide modding support.
Stars: ✭ 28 (-68.18%)
Mutual labels:  unofficial
SmartBuff Unofficial
Unofficial version for WoW 9.x
Stars: ✭ 21 (-76.14%)
Mutual labels:  unofficial
stweet
Advanced python library to scrap Twitter (tweets, users) from unofficial API
Stars: ✭ 287 (+226.14%)
Mutual labels:  unofficial
ruby
Official Ruby client library for IPinfo API (IP geolocation and other types of IP data)
Stars: ✭ 42 (-52.27%)
Mutual labels:  wrapper-api
ManyMC
📦 A familiar Minecraft Launcher with native support for macOS arm64 (M1)
Stars: ✭ 320 (+263.64%)
Mutual labels:  unofficial
vk-api
VK SDK | VKontakte wrapper for standalone apps
Stars: ✭ 30 (-65.91%)
Mutual labels:  wrapper-api
YouTube.js
🎥 full-featured wrapper around YouTube's private API — reverse engineering InnerTube
Stars: ✭ 2,232 (+2436.36%)
Mutual labels:  unofficial
go-coinmarketcap
The Unofficial Coin Market Cap API client for Go.
Stars: ✭ 61 (-30.68%)
Mutual labels:  unofficial
olsb cores
The core of OLSB project.
Stars: ✭ 14 (-84.09%)
Mutual labels:  unofficial
droidovpn
An unofficial VPN Gate client for Android.
Stars: ✭ 65 (-26.14%)
Mutual labels:  unofficial
3commas-typescript
Typescript 3commas API library
Stars: ✭ 21 (-76.14%)
Mutual labels:  3commas-api
LineageOS-Installer
A simple, graphical solution to installing LineageOS.
Stars: ✭ 18 (-79.55%)
Mutual labels:  unofficial
edk2-nightly
Unofficial EDK2 nightly build
Stars: ✭ 20 (-77.27%)
Mutual labels:  unofficial
UnofficialCrusaderPatch
Unofficial balancing patch installer for Stronghold Crusader 1
Stars: ✭ 373 (+323.86%)
Mutual labels:  unofficial
figma-plus-advanced-rename-plugin
A better and more powerful batch rename plugin for Figma with a dozen of options
Stars: ✭ 28 (-68.18%)
Mutual labels:  unofficial
tus-class
✨TUS CLASS front-end APP(Unofficial)
Stars: ✭ 21 (-76.14%)
Mutual labels:  unofficial

py3cw

Upload Python Package

Unofficial wrapper for the 3Commas API written in Python.


How to install

pip install py3cw

How to use

from py3cw.request import Py3CW

# request_options is optional, as all the keys from the dict
# so you can only change what you want.
#
# default options for request_options are:
# request_timeout: 30s (30 for connect, 30 for read)
# nr_of_retries: 5
# retry_status_codes: [500, 502, 503, 504]
# retry_backoff_factor (optional): It allows you to change how long the processes will sleep between failed requests.
# For example, if the backoff factor is set to:
# 1 second the successive sleeps will be 0.5, 1, 2, 4, 8, 16, 32, 64, 128, 256.
# 2 seconds - 1, 2, 4, 8, 16, 32, 64, 128, 256, 512
# 10 seconds - 5, 10, 20, 40, 80, 160, 320, 640, 1280, 2560
# 
# NOTE: Nr of retries and retry_status_codes will also be used if we get 
# an falsy success from 3 commas (eg: { "error": { "status_code": 502 }})
p3cw = Py3CW(
    key='', 
    secret='',
    request_options={
        'request_timeout': 10,
        'nr_of_retries': 1,
        'retry_status_codes': [502],
        'retry_backoff_factor': 0.1
    }
)

# With no action
# Destruct response to error and data
# and check first if we have an error, otherwise check the data
error, data = p3cw.request(
    entity='smart_trades_v2',
    action=''
)

# With payload data
# Destruct response to error and data
# and check first if we have an error, otherwise check the data
error, data  = p3cw.request(
    entity='smart_trades_v2', 
    action='new', 
    payload={
        "account_id": 123456,
        ......
    }
)

# With action_id replaced in URL
# Destruct response to error and data
# and check first if we have an error, otherwise check the data
error, data = p3cw.request(
    entity='smart_trades_v2', 
    action='get_by_id',
    action_id='123456'
)

An entity represents main categories. Meaning, you have accounts, bots, marketplace, deals or smart_trades

An action is represented by a ... well, an action of a specific category. There are multiple actions you can use (check 3commas API)

action_id is used to replace the necessary account_id or bot_id or deal_id (you get the picture) needed on some actions. For example the action sell_all_to_btc requires the account_id (POST /ver1/accounts/{account_id}/load_balances)

payload is the data you send.

Forced mode header could be added with the parameter additional_headers. Allowed values are 'real' or 'paper'. E.g. ... additional_headers={'Forced-Mode': 'paper'} ...


3Commas API helpers.

3Commas Docs: https://github.com/3commas-io/3commas-official-api-docs

Accounts: https://github.com/3commas-io/3commas-official-api-docs/blob/master/accounts_api.md

Bots: https://github.com/3commas-io/3commas-official-api-docs/blob/master/bots_api.md

Deals: https://github.com/3commas-io/3commas-official-api-docs/blob/master/deals_api.md

Marketplace: https://github.com/3commas-io/3commas-official-api-docs/blob/master/marketplace_api.md

Grid Bots: https://github.com/3commas-io/3commas-official-api-docs/blob/master/grid_bots_api.md

Smart Trades: https://github.com/3commas-io/3commas-official-api-docs/blob/master/smart_trades_v2_api.md


Best used with Binance.

buy me a beer 🍺

ETH: 0x0c2EA600d8bECE889F998D6a22332298E879940b

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].