Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit 7636ebe

Browse files
committed
Update the API for September
1 parent b6daee7 commit 7636ebe

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

kucoin/market/market.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,37 @@ def get_symbol_list_v2(self, **kwargs):
543543
params.update(kwargs)
544544
return self._request('GET', '/api/v2/symbols', params=params)
545545

546+
def get_symbol_detail(self, symbol):
547+
"""
548+
get detail currency pairs for trading. If you want to get the market information of the trading symbol, please use get_symbol_list_v2
549+
https://www.kucoin.com/docs/rest/spot-trading/market-data/get-symbol-detail
550+
:return
551+
{
552+
"data" : {
553+
"quoteMinSize" : "0.1",
554+
"quoteCurrency" : "USDT",
555+
"feeCurrency" : "USDT",
556+
"symbol" : "BTC-USDT",
557+
"market" : "USDS",
558+
"baseMaxSize" : "10000000000",
559+
"baseIncrement" : "0.00000001",
560+
"quoteIncrement" : "0.000001",
561+
"priceIncrement" : "0.1",
562+
"priceLimitRate" : "0.1",
563+
"minFunds" : "0.1",
564+
"isMarginEnabled" : true,
565+
"enableTrading" : true,
566+
"baseCurrency" : "BTC",
567+
"baseMinSize" : "0.00001",
568+
"name" : "BTC-USDT",
569+
"quoteMaxSize" : "99999999"
570+
},
571+
"code" : "200000"
572+
}
573+
"""
574+
return self._request('GET', f'/api/v2/symbols/{symbol}')
575+
576+
546577
def get_currency_detail_v3(self, currency,chain=None):
547578
"""
548579
Get Currency Detail

kucoin/tests/config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import os
2+
3+
api_key = os.getenv("API_KEY").strip()
4+
secret = os.getenv('API_SECRET').strip()
5+
passphrase = os.getenv('API_PASSPHRASE').strip()

kucoin/tests/test_market.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from kucoin.client import Market
2+
from kucoin.tests.config import api_key, secret, passphrase
3+
4+
client = Market(key=api_key, secret=secret, passphrase=passphrase)
5+
6+
print(client.get_symbol_detail("BTC-USDT"))

0 commit comments

Comments
 (0)