Package: kucoin-cli
======================================================
Kucoin-Cli: Pandas-oriented REST and Websocket WrapperA data science focused Python API implementation.. image::https://img.shields.io/pypi/v/kucoin-cli.svg:target:https://pypi.org/project/kucoin-cli/.. image::https://img.shields.io/pypi/l/kucoin-cli.svg:target:https://pypi.org/project/kucoin-cli/.. image::https://img.shields.io/badge/Maintained-YES-green.svg:target:https://pypi.org/project/kucoin-cli/Why use this library overpython-kucoin <https://github.com/sammchardy/python-kucoin>_ or theofficial SDK <https://github.com/Kucoin/kucoin-python-sdk>_?
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++This package was written with an eye towards data science and quantitative trading strategies. Specifically designed for fast, efficient data acquisition and high complexity
trades such as HFT, market-making, and long-short strategies. Wherever possible, endpoints have been neatly wrapped to pandas DataFrames with key data
acquisition enpoints thoughtfully constructed with rich configurability reducing time needed to clean and filter data. Trading functions are
explicitly geared towards simplicity with seamless margin trade integration. Of special note, OHLCV acquisition from the KuCoin REST API has been overhauled
to enable the user to query multiple assets over extended time periods despite the standard enpoint's limitations of a single asset with a max 1500 bars of historic data. For large scale
ML projects, leverage thekucoincli.pipemodule for a one-line function capable of piping large amounts of OHLCV data directly into the user's SQL database solution.Automate the generation of a enormous SQL databases withkucoincli.pipeTake complex trading algorithms live via websockets usingkucoincli.socket[work in progress]Quickly obtain, clean, and organize large amounts of data for use in RL/ML models withkucoincli.clientDisclaimer: This is an unofficial implementation of the KuCoin Rest and Websocket API v2. Use this package at your own risk.Roadmap
+++++++
| [ ] Finish writing documentation
| [ ] Clean-up websocket implemention and improve ease of use
| [ ] Add stop-loss order capabilities
| [ ] Add schema configuration functionality to data pipeline
| [ ] Add futures API access
| [ ] Develop an asynchronous REST clientFeatures
++++++++One-line database pipeline. Open a high stability pipe from the KuCoin OHLC(V) endpoint to your SQL databaseAutomatically creates database or adds to pre-existing dbCapable of handling multi-day data acqusitions sessions through dynamic timeout mechanismTake a look at a pre-built example in theexamplesfolder available atmy github <https://github.com/jaythequant/kucoin-cli>_Highly configurable data acquisition endpointsSpend less time cleaning and managing dataCheckout.ohlcv,.orderbook,.symbols, and.all_tickersAccess to 99%+ of KuCoin REST and Websocket endpointsSeamless order management between Spot and Margin marketsQuickstart
++++++++++Register for an account atKuCoin <https://www.kucoin.com/>_Generate an API <https://www.kucoin.com/account/api>_Download kucoin-cli using pip.. code-block:: bashpip install kucoin-cliTry out some functions!.. code-block:: pythonfrom kucoincli.client import ClientYour own credentials hereapi_key = 'api_key'
api_secret = 'api_secret'
api_passphrase = 'api_passphrase'client = Client(api_key, api_secret, api_passphrase)Pull details for all marginable currencies quoted in BTC termsmarginable_btc_curr = client.symbols(quote="BTC", marginable=True)Pull buy/sell orders for BTC-USDTorder_df = client.get_order_histories("BTC-USDT")Query one month of minutely data for BTC-USDT and ETH-USDTohlcv_df = client.ohlcv(
tickers=["BTC-USDT", "ETH-USDT"],
begin="2022-01-01",
end="2022-02-01",
interval="1min",
)Buy 500 USDT of ETH at market price on the spot marketorder = client.order(
symbol="ETH-USDT",
side="buy",
funds=500,
)Place a 10 minute Good-to-Time margin limit sell order for 1 BTC @ 24,000 USDTorder = client.order(
symbol="BTC-USDT",
side="sell",
price=24_000,
size=1.0000,
tif="GTT",
cancel_after=600,
margin=True,
type="limit",
)Obtain the full orderbook depth for XRP-USDT as a namedtuple containing numpy arraysorderbook = client.orderbook("XRP-USDT", depth="full", format="numpy")Specifyformat="pd"to obtain an identical result wrapped in a pandas dataframeorderbook = client.orderbook("XRP-USDT", depth="full", format="pd")WhyKuCoin <https://www.kucoin.com/>_?
++++++++++++++++++++++++++++++++++++++++For U.S. based customers, KuCoin is one of the few non-KYC exchangesIndustry low transactions feesHigh liquidity across coins and a wide offering of altsFrequent new coin listingsConsider donating:
++++++++++++++++++| Etherium Wallet: 0x109CcCCEc0449E80336039c983e969DD23B9CE3E
| Bitcoin Wallet: 3L47AT1SoLGs65RFHYBdVmbCdtQNxZFry6Distributions & Info:
+++++++++++++++++++++KuCoin-Cli Documentation on readthedocs <https://kucoin-cli.readthedocs.io/en/latest/>_Kucoin-Cli on PyPI <https://pypi.org/project/kucoin-cli/>_Kucoin-Cli on Github <https://github.com/jaythequant/kucoin-cli>_Official Kucoin API Documenation <https://docs.kucoin.com/#general>_