BitMEX api-nonce will not be supported after 12 March 2019.
See original GitHub issue- OS: Any
- Programming Language version: Python version Any
- CCXT version: latest
- Exchange: BitMEX
- Method: All of auth methods
Hi, BitMEX has announced that api-nonce will not be supported after 12 March 2019, in their blog.(Now in Korean and Japanese and Russian, not yet in English and Chinese.) https://blog.bitmex.com/?lang=ja
And in official doc, they wrote This scheme(nonce), while still supported, has significant problems with multithreaded clients and should not be used. Do not use it for new applications
.
https://www.bitmex.com/app/apiKeysUsage#Authenticating-with-an-API-Key
So, I think that this Lib should support api-expires
as default, and milliseconds()
is preferred than seconds()
to make expires.
Please take care of the code below.
https://github.com/ccxt/ccxt/blob/master/python/ccxt/bitmex.py#L722-L735
expires = self.safe_integer(self.options, 'api-expires')
nonce = str(self.nonce())
headers = {
'Content-Type': 'application/json',
'api-key': self.apiKey,
}
if expires is not None:
expires = self.sum(self.seconds(), expires)
expires = str(expires)
auth += expires
headers['api-expires'] = expires
else:
auth += nonce
headers['api-nonce'] = nonce
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Deprecation of api-nonce Header - BitMEX Blog
... the api-nonce header will no longer be supported starting on Tuesday 12th March 2019. BitMEX will not check for increasing nonces as ......
Read more >BitMEX API Changelog
Dec 16, 2019. Order: Orders with a pegPriceType of LastPeg or MidPricePeg are no longer supported and will be rejected. Order ...
Read more >Posts Archives | Page 43 of 116 | BitMEX Blog
BitMEX offers a variety of contract types. All contracts are bought and paid out in Bitcoin. BitMEX created the “Perpetual Contract”, a high...
Read more >API Keys Usage - BitMEX
By default, API Keys can only read basic data, such as positions, margin, orders, and executions. They cannot submit orders or withdraw.
Read more >Chinese (中文) Archives | Page 37 of 78 | BitMEX Blog
Full Catalogue ; 关于 2019 年第二季度季度期货上架. 12 Mar 2019 ; 关于不再支持 api-nonce 标头. 5 Mar 2019 ; 关于批量委托请求功能的更新. 15 Feb 2019 ; 有关...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In case someone needs to override it, this is how it’s done:
Hi, Thanks for your reply 🙂
seconds()
is also OK, I suppose. BitMEX’s official implementation is here. 🙂 (+ 5
is important.) https://github.com/BitMEX/api-connectors/blob/master/official-http/python-swaggerpy/BitMEXAPIKeyAuthenticator.py#L30I just care in case that same
api-expires
has sent by multi-threaded clients. (But still no problems, I think.)