Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(kucoin): add new validation header #22503

Merged
merged 2 commits into from
May 15, 2024

Conversation

carlosmiei
Copy link
Collaborator

No description provided.

@carlosmiei carlosmiei self-assigned this May 15, 2024
@carlosmiei
Copy link
Collaborator Author

DEMO

 p kucoin createOrder "LTC/USDT" market sell 0.1 --verbose 
Python v3.11.7
CCXT v4.3.23
kucoin.createOrder(LTC/USDT,market,sell,0.1)

fetch Request: kucoin POST https://api.kucoin.com/api/v1/orders RequestHeaders: {'KC-API-KEY-VERSION': '2', 'KC-API-KEY': '64f9d46c118c25000146fd1b', 'KC-API-TIMESTAMP': '1715779458397', 'Content-Type': 'application/json', 'KC-API-PASSPHRASE': 'maaTP6GxhaO8bo0Vk22eEnNbpveKX8S1WeK8eNkmV2I=', 'KC-API-SIGN': 'Zy6Y8Pawznfm2yhbQZ40WgnVD7212oztFyBjsytoG7k=', 'KC-API-PARTNER-SIGN': '1ES59zcsk8yoNYI51bDh78xSVwWOOIOr6Oz4wju4eE8=', 'KC-API-PARTNER': 'ccxt', 'KC-API-PARTNER-VERIFY': 'true', 'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate'} RequestBody: {"clientOid":"9faf461a-2470-4504-8062-8153e6cda49e","side":"sell","symbol":"LTC-USDT","type":"market","size":"0.1"}

fetch Response: kucoin POST https://api.kucoin.com/api/v1/orders 200 ResponseHeaders: {'Date': 'Wed, 15 May 2024 13:24:18 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Set-Cookie': 'AWSALB=L8IqCwRyLxKa2QcakrbJErwNbJFDhNQQNTxShusV6W8gsUko8H/zab9Slch7h7NkbbFBtSs/R0oRvue2zf0mD0ZRVBQremvA0qSwrewQ2+CRCY/OoMVS24P5tCt2; Expires=Wed, 22 May 2024 13:24:18 GMT; Path=/, AWSALB=L8IqCwRyLxKa2QcakrbJErwNbJFDhNQQNTxShusV6W8gsUko8H/zab9Slch7h7NkbbFBtSs/R0oRvue2zf0mD0ZRVBQremvA0qSwrewQ2+CRCY/OoMVS24P5tCt2; Expires=Wed, 22 May 2024 13:24:18 GMT; Path=/', 'gw-ratelimit-remaining': '3996', 'gw-ratelimit-limit': '4000', 'gw-ratelimit-reset': '18387', 'Strict-Transport-Security': 'max-age=9800; includeSubDomains; preload', 'CF-Cache-Status': 'DYNAMIC', 'Server': 'cloudflare', 'CF-RAY': '8843728f29badd03-LHR', 'Content-Encoding': 'gzip'} ResponseBody: {"code":"200000","data":{"orderId":"6644b7820d97730007c4e831"}}
{'amount': None,
 'average': None,
 'clientOrderId': None,
 'cost': None,
 'datetime': None,
 'fee': {'cost': None, 'currency': None},
 'fees': [{'cost': None, 'currency': None}],
 'filled': None,
 'id': '6644b7820d97730007c4e831',
 'info': {'orderId': '6644b7820d97730007c4e831'},
 'lastTradeTimestamp': None,
 'lastUpdateTimestamp': None,
 'postOnly': None,
 'price': None,
 'reduceOnly': None,
 'remaining': None,
 'side': None,
 'status': None,
 'stopLossPrice': None,
 'stopPrice': None,
 'symbol': 'LTC/USDT',
 'takeProfitPrice': None,
 'timeInForce': None,
 'timestamp': None,
 'trades': [],
 'triggerPrice': None,
 'type': None}

@carlosmiei carlosmiei merged commit 29984fb into ccxt:master May 15, 2024
1 of 2 checks passed
kroitor pushed a commit that referenced this pull request May 15, 2024
* feat(kucoin): add new validation header

* bool to string

[ci skip]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant