Kucoin Futures wrapper library
Project description
Kucoin Futures Library
Class Structure
classDiagram
namespace kucoin_futures_lib {
class KucoinFutures["KucoinFutures"]
class KucoinFuturesMarket["KucoinFuturesMarket"]
class KucoinFuturesTrade["KucoinFuturesTrade"]
class KucoinFuturesUser["KucoinFuturesUser"]
class KucoinFuturesWebsocket["KucoinFuturesWebsocket"]
class KucoinFuturesHelper["KucoinFuturesHelper"]
class EntryRangeHandler["handlers.EntryRangeHandler"]
class OcoHandler["handlers.OcoHandler"]
}
namespace kucoin_futures {
class Market["client.Market"]
class Trade["client.Trade"]
class User["client.User"]
class WsToken["client.WsToken"]
class KucoinFuturesWsClient["ws_client.KucoinFuturesWsClient"]
}
KucoinFutures o-- KucoinFuturesMarket
KucoinFutures o-- KucoinFuturesTrade
KucoinFutures o-- KucoinFuturesUser
KucoinFutures o-- KucoinFuturesWebsocket
KucoinFuturesMarket o-- Market
KucoinFuturesTrade o-- Trade
KucoinFuturesUser o-- User
KucoinFuturesWebsocket o-- WsToken
KucoinFuturesWebsocket o-- KucoinFuturesWsClient
KucoinFuturesWebsocket o-- EntryRangeHandler
KucoinFuturesWebsocket o-- OcoHandler
Usage Examples
from kucoin_futures_lib import initialize_kucoinf
kucoinf = initialize_kucoinf(
api_key='your-api-key',
api_secret='your-api-secret',
api_passphrase='your-api-passphrase',
)
account_overview = kucoinf.user.get_account_overview()
balance = account_overview["accountEquity"]
print(f"Account balance: {balance}")
# Create a market order with limit take profit and market stop loss
order_id = kucoinf.create_order(
instrument="XBTUSDTM",
side="buy",
size=3,
take_profit=75000,
stop_loss=60000,
leverage=10
)
print(f"Order ID: {order_id}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kucoin_futures_lib-0.10.0.tar.gz
(14.8 kB
view hashes)
Built Distribution
Close
Hashes for kucoin_futures_lib-0.10.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c894766351c766fe8b2698a7c119ddab9bcddbbe999da69ca57ab573f520d6c1 |
|
MD5 | 0594a9e745339da35c5aded5c8582e51 |
|
BLAKE2b-256 | 2027920c7bfc4a29f68ebb1999e8422176167824386aa27f60518e7717726919 |
Close
Hashes for kucoin_futures_lib-0.10.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6c9b9e2990a3589d3cca912490333b1019a8f412ead6b3e40dfb7e21d2b829c |
|
MD5 | 8681bdefc863f75d690083656507fe66 |
|
BLAKE2b-256 | c5920b5e01f70f2ff46ddc4f3531bdf4c289f601f4fd0e32e579597ad6c3c3c9 |