Skip to main content

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

  1. Set environment variables
export API_SECRET_KEY=xxx
export API_ACCESS_KEY=yyy
export API_PASSPHRASE=zzz
  1. Initialize
from alpine.exchanges import Wrapper

w = Wrapper('bitget')
  1. Set a leverage
w.set_leverage(leverage, position, symbol, margin_coin)
# Example: w.set_leverage(10, "long", "FETUSDT", "usdt")
  1. 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)
  1. Get order detail
w.get_order_detail(symbol, order_id)
# Example: w.get_order_detail("FETUSDT", "123456")
  1. Get current position detail
w.get_current_position(symbol, margin_coin)
# Example: w.get_current_position("FETUSDT", "usdt")
  1. 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.0.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

crypto_alpine-0.1.0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file crypto_alpine-0.1.0.tar.gz.

File metadata

  • Download URL: crypto_alpine-0.1.0.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.2 Darwin/23.2.0

File hashes

Hashes for crypto_alpine-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e43e179a7adbb23dbd5056db5133fb43797bb0685d8b7c202d4cf7b7773aef56
MD5 556238374b345550b02b28659759d11c
BLAKE2b-256 6280e2965b8ff11b4d87a074f4517cbde18c7f4d4b47da4dc4b8b3166268c3d8

See more details on using hashes here.

File details

Details for the file crypto_alpine-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: crypto_alpine-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.2 Darwin/23.2.0

File hashes

Hashes for crypto_alpine-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d7eb7586c908aa2ee84dba688346d895b8ac5cbc8a327a886449f13afb7ec967
MD5 9b2108401c37a97c67aac05edbb133e1
BLAKE2b-256 4ed6e6c2152dbe46bf8050f137714072e8083570baa8aabbef002369edfe0016

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page