BitMEX / api-connectors

Libraries for connecting to the BitMEX API.

Home Page:https://www.bitmex.com/app/restAPI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node js swagger client returns empty apis object

flolege opened this issue · comments

My code:

image

How does this work?

Ok I progressed by using

url: 'https://www.bitmex.com/api/explorer/swagger.json',

as the description correctly points out. It was one of the first things I tried out but I got very confused and thought I was still connected to the testnet because the "trades" object contains trades from 2015...?

image
`
What is going on here? Why they do show something from 2015?

I know I am connected to my user account correctly. I can see my orders via the API.

BUT also a strange thing is that in the returned orders I can see in the orders returned an order I did not do (made yesterday, I do not see this order in my order list too!)

const tradeResponse = await bitmexClient.apis.Trade.Trade_get({symbol: 'XBT', count: 10, reverse:true})

Would be nice to set that into the example.

Only problem left is the foreign order in my order list. Does bitmex do an initial order when someone opens an account? My account is new, just got today the KYC confirmation and just today transfered coins to my wallet. But this order is see is from YESTERDAY.

Ok...It was an order from me :) yesterday when I had not yet KYC confirmation and balance on the wallet. yet I just clicked some buttons....