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.12.0.tar.gz
(15.9 kB
view hashes)
Built Distribution
Close
Hashes for kucoin_futures_lib-0.12.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f2d43e4d9422eb6ed1fb51d382c0534096aaec94f3270a343a0cc7f97e808c7 |
|
MD5 | f4f1b5597b2a71498b23f54e2ad6718e |
|
BLAKE2b-256 | 4ce28861e87f4083e5dc0195bc09c7815817ffe8ced498b44a50fac8168f579b |
Close
Hashes for kucoin_futures_lib-0.12.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4b58302a74888cc381ed8a6e97c4ec2793cabb0d69a4e706d3bb378c0c12949 |
|
MD5 | 137626f440d29786dad6e35d3cc98922 |
|
BLAKE2b-256 | e9e320432393ec6a6de2c1cccd038a233ab36cdef6ad1ca9748348a40223cf41 |