Python library for cryptocurrency trading
Project description
crypto-alpine
Python library for cryptocurrency trading using the most common exchanges.
How to install
pip install -U crypto-alpine
Documentation
- Set environment variables
export API_SECRET_KEY=xxx
export API_ACCESS_KEY=yyy
export API_PASSPHRASE=zzz
- Initialize
from alpine.exchanges import Wrapper
w = Wrapper('bitget')
- Set a leverage
w.set_leverage(leverage, position, symbol, margin_coin)
# Example: w.set_leverage(10, "long", "FETUSDT", "usdt")
- Create an order
w.create_order(position, symbol, price, amount, margin_coin, take_profit, stop_loss)
# Example: w.create_order("long", "FETUSDT", 2.5, 100, "usdt", 3, 2)
- Get order detail
w.get_order_detail(symbol, order_id)
# Example: w.get_order_detail("FETUSDT", "123456")
- Get current position detail
w.get_current_position(symbol, margin_coin)
# Example: w.get_current_position("FETUSDT", "usdt")
- Get historical position detail
w.get_historical_position(symbol, margin_coin)
# Example: w.get_historical_position("FETUSDT", "usdt")
Current supported cryptocurrency exchanges
- bitget
Need help
Please create an issue if you need a feature/exchange to be implemented.
Support
If you wish to support the project:
- Ethereum: 0xf11B49666d3386C96Af1A496bFA5688c83B25E8e
- Solana: C7USpoN4kxEm81w3mpK7FuNQ7zcMWY9fqyuacPafRqnk
- Bitcoin (segwit): bc1qcq7fdn4khlsc5ldmlf0ezks8p9r5q2hn04lyy5
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
crypto_alpine-0.1.1.tar.gz
(17.3 kB
view details)
Built Distribution
File details
Details for the file crypto_alpine-0.1.1.tar.gz
.
File metadata
- Download URL: crypto_alpine-0.1.1.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.9 Darwin/23.2.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17291363b7ea1f58f63f22a3d7c26f5d82454b247248fa3feb134355ed2c83a7 |
|
MD5 | d95997814a21d7e080d6739d34f74557 |
|
BLAKE2b-256 | 4fa25446343e7a718441fedbb98ac39fed17e26197cf8005e06c147d69b2372d |
File details
Details for the file crypto_alpine-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: crypto_alpine-0.1.1-py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.9 Darwin/23.2.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d89efb55983f877b7960e76b4bf0f7e5bfe6ffb4eab6250a5e8ab15dabd5d9e |
|
MD5 | c645891216c5ab46e076bd8f472af826 |
|
BLAKE2b-256 | e335950c5471a0b5b22b91e7cf6c754d14b2bfb2ffbb045d6c5b058c19618c00 |