node.bittrex.api icon indicating copy to clipboard operation
node.bittrex.api copied to clipboard

Any way to monitor orders?

Open rebers opened this issue 8 years ago • 9 comments

Hi there,

Love this library, really makes stuff straight forward.

Is there any way to retrieve or get notified when an order of mine was filled?

Can't find anything anywhere!

Thanks

rebers avatar Aug 03 '17 07:08 rebers

getopenorders({ market: code }, (response, err) => { }); getorderhistory({ market: code }, (response, err) => { });

documentation https://bittrex.com/Home/Api

dparlevliet avatar Aug 03 '17 09:08 dparlevliet

Thanks @dparlevliet but that would mean I have to query them manually, right? Does that mean the websocket API does not support it?

rebers avatar Aug 03 '17 19:08 rebers

Correct, the Bittrex API is still new and they do not yet support Authentication via the Websockets in-order to receive events, but they are working on it. So, for now you will have to query it. Personally, I query every 15s.

dparlevliet avatar Aug 03 '17 21:08 dparlevliet

One more question here: The Bittrex API docs say the market is optional. But not providing it always provides null, while e.g. BTC-ETH works. I can only assume this is a bug or am I doing something wrong?

The below examples all return null.

bittrex.getorderhistory(null, (data) => {
  console.log(data);
});

bittrex.getorderhistory({ market: null }, (data) => {
  console.log(data);
});

bittrex.getorderhistory({ market: '' }, (data) => {
  console.log(data);
});

This one works:

bittrex.getorderhistory({ market: 'BTC-ETH' }, (data) => {
  console.log(data);
});

Manually requesting the API works as expected though.

rebers avatar Aug 07 '17 10:08 rebers

All of the above return null for me

DWboutin avatar Aug 22 '17 23:08 DWboutin

The params you send to getorderhistory() are passed directly to Bittrex without intervention from the library so if you want to have no market then you would need to do

bittrex.getorderhistory({}, (data) => {
  console.log(data);
});

The only one I see the ability to compensate for is

bittrex.getorderhistory(null, (data) => {
  console.log(data);
});

The library could provide {} as a default param if null/false/undefined is passed as a parameter. The other two examples are legitimate URL requests.

dparlevliet avatar Aug 23 '17 00:08 dparlevliet

Hi,

I've managed to put buy limit order from API, but It's not listed together with the other orders in the account. How can I see orders made trough API?

Note: Using getorderhistory API the order is not listed again, but using the getorder API the order is returned.

mirrorps avatar Oct 03 '17 14:10 mirrorps

Have you guys figured out GetOrderHistory in v2.0?

skyl avatar Oct 12 '17 05:10 skyl

@skyl https://github.com/thebotguys/golang-bittrex-api/wiki/Bittrex-API-Reference-(Unofficial)

denigada avatar Jan 05 '18 15:01 denigada