Questions tagged [bitmex]

Questions about BitMEX products and APIs. BitMex is a P2P crypto-products trading platform.

30 questions
4
votes
2 answers

HTTP Delay from AWS Instance to Bitmex with Boost Beast and Ubuntu 18

I have an AWS ec2 instance in eu-west-1c which is the same data centre as the target server - www.bitmex.com. If I run $ping bitmex.com from the instance the average round trip time is ~0.4 milliseconds. The same is true for $ping bitmex.com/api/v1…
jp94
  • 315
  • 4
  • 15
3
votes
1 answer

How to extract individual and unique live trades from Bitmex Websocket API ws.recent_trades() log

I am trying to stream live trade data from Bitmex to perform some calculations and to automate my trade. I have used the following code obtained from https://github.com/BitMEX/api-connectors/blob/master/official-ws/python/main.py and my code is as…
atjw94
  • 529
  • 1
  • 6
  • 22
3
votes
1 answer

Using httr to place orders through BitMex API

I'm trying to use the httr R package to place orders on BitMex through their API. I found some guidance over here, and after specifying both my API key and secret in respectively the objects K and S, I've tried the following verb <- 'POST' expires…
3
votes
2 answers

How make a node.js script to be restarted every hour?

I have a node.js script that creates a websocket connection to a crypto trading site (bitmex). It streams price data. For some reason after an hour or two the stream goes bad and the prices (if streamed at all) are inacurate. For now I restart it…
2
votes
0 answers

Creating an elegant solution to avoid HTTPServiceUnavailable

I have one third-party API-kit module (bitmex). I have many calls to this module in my code. The problem is that this API-kit often gives me an error: HTTPServiceUnavailable I understand that this error is due to unstable BitMEX servers. But if it…
2
votes
1 answer

Can not read property 0 of undefined

I get Uncaught TypeError: "Cannot read property '0' of undefined" error. I just can't figure out the issue. Although the program run's fine & I'm getting the desired output. But the error... Console screenshot Console screeshot / resp…
ImGrooot
  • 23
  • 1
  • 5
2
votes
1 answer

Bitmex API (PHP), cancel one order doesn't work

I'm using PHP. When I try to cancel one active order via API i got error: "error" => array:2 [▼ "message" => "orderIDs or clOrdIDs must be sent." "name" => "ValidationError" ] I put orderID as array (this is my lib method): public function…
user137
  • 629
  • 1
  • 8
  • 20
1
vote
1 answer

What is the coinbase pro api equivalent to https://www.bitmex.com/api/v1/instrument/active

I am trying to convert a bitmex api block of code to coinbase pro API. Is there a coinbase pro api equivalent to https://www.bitmex.com/api/v1/instrument/active
1
vote
1 answer

Python Bitmex trading Bot -. Connection error while making get request to api/v1/instrument/active and api/v1/user/margin

I am learning how to build a Python Trading bot, I am in my first steps in programming and I need some help. I came across this error while trying to use an API connector to get info from the Base URL and Websocket from bitmex.com. This is the code…
1
vote
0 answers

Failed to exit websocket connection for Bitmex testnet by Python

I'm trying some basic stuff for connecting Bitmex testnet websocket. I originally wanted to close the WS connection by exit() function after receiving some data with market_depth() function. But somehow the exit() function didn't work and WS just…
JJC
  • 41
  • 1
1
vote
0 answers

Bitmex sample-market-maker [SSL: CERTIFICATE_VERIFY_FAILED]

I setup Bitmex sample-market-maker using python and after running marketmaker XBTUSD I get this output: 2020-05-14 00:29:58,439 - INFO - market_maker - BitMEX Market Maker Version: v1.1 2020-05-14 00:29:58,439 - INFO - ws_thread - Connecting to…
1
vote
2 answers

Hello i have a error with the bitmex rest api connection

i have a problem with the Bitmex Api, im trying to connect to the api for send orders for buy or sell and i realice the instalation for bitmex: pip3 install bitmex and after i realice the connection with the suggest command: from bitmex import…
Gabriel
  • 11
  • 3
1
vote
0 answers

Bitmex Signature Not Valid

I am trying to make authenticated post request to place an order on the testnet. I have been trying to get it going for couple of days, but unable to figure out why I get "Signature not Valid" import json import requests import aiohttp import…
arti13
  • 43
  • 2
  • 6
1
vote
2 answers

"amount is invalid" error when i try to withdraw in Bitmex (ccxt)

This is my route: router.post('/withdraw', async (req, res, next) => { const {code, address, amount, otpToken, currency } = req.body; const exchange = await new ccxt.bitmex(); exchange.apiKey = "MY - KEY"; exchange.secret = "MY - SECRET"; …
Nicolas Urman
  • 153
  • 1
  • 1
  • 9
1
vote
2 answers

Trouble accessing a specific property in Python

The module: https://github.com/yanagisawa-kentaro-777/pybitmex/blob/master/pybitmex/bitmex.py I'm using ws_open_order_objects_of_account() and with it, I can access: open_orders = bitmex.ws_open_order_objects_of_account() for open_bid in…
xendi
  • 2,332
  • 5
  • 40
  • 64
1
2