BitMEX Tool - API in Google Sheets | Google Script | Query the REST endpoints

Опубликовано: 30 Сентябрь 2024
на канале: Moosy Research
2,917
27

Bitmex tool is now replaced by ReX, see:
https://sites.google.com/site/moosyre...

BitMEX Tool (ReX) is a test tool to Query the BitMEX REST API endpoints.
It works on both testnet and the live environment. Just change the address in the CONFIG tab
https://testnet.bitmex.com/api/v1/ or https://bitmex.com/api/v1/

Another cool sheet for BitMEX:
https://sites.google.com/site/moosyre...

[email protected]

balances open positions


On BitMEX you are trading derivatives contracts, not the underlying asset. The realised PNL of all trades is in XBT terms and all deposits/withdrawals to/from BitMEX are also made in XBT. Therefore your wallet balance is always only in XBT.

To see your positions please query the positions endpoint - https://www.bitmex.com/api/explorer/#...

explore

API explorer from Excel like spreadsheet


The term API stands for Application Programming Interface.

APIs make it possible for programs, like Google Sheets to interact with BitMEX.An API Key and Secret Key are secret tokens used for authentication and authorization and determine access control.

By default, API Keys on BitMEX can only read basic user data, such as positions, margin, orders, and executions. They cannot submit orders or withdraw. So they are basically limited and 'read-only' !

Some examples of data you can request from the API:
Pricing Data
Trade Data
OrderBook Data
Settlement Data
Exchange Statistics

The BitMEX Tool Sheet, allows you to run these functions from sheets and pull the data directly into your spreadsheet.


Examples:
See open or closed positions on BitMEX

History of your wallet
If you are familiar with spreadsheet functionality; you can do your own magic with this data in the spreadsheet.

All BitMEX REST API (Get) functions can be used from the tool.
See the BitMEX doc on https://www.bitmex.com/api/explorer/



To get started:
Copy the sheet to your personal Google Drive
Authorize the script by pressing the 'Update' button
Create your API key on BitMEX
Enter your key/secret in CONFIG



Privacy and Security:
If you copy the sheet, the sheet is securely stored on your personal Google drive. https://drive.google.com

Others can not access your copy of the sheet, the url is only accessible by you if you are logged into Google !!

It's protected in the same way Gmail is !!

bitmex spreadsheet excel sheet sheets bit mex google script javascript apps script