binance-exchange/node-binance-api

Is it possible to place an order on test endpoint ?

hlalibe opened this issue · 3 comments

I see on this page that we can place an order on a test endpoint for trial purpose:
https://binance-docs.github.io/apidocs/spot/en/#spot-account-trade
The test endpoint is:
/api/v3/order/test
instead of
/api/v3/order

With this library, is it possible to do so ?

thanks

Hi there!

The latest version is available here https://github.com/jaggedsoft/node-binance-api

You can enable test mode like this:

const Binance = require('node-binance-api');
const binance = new Binance({
  APIKEY: '<key>',
  APISECRET: '<secret>',
  test: true
});

This works for margin and spot trading.
Please note that test mode for futures trading isn't automatic yet, and requires manually setting the endpoint url to test. See jaggedsoft#404

Ok thanks for your answer, i've updated my bookmark.
I see both repositories install with:
npm install node-binance-api --save
I'm not entirely familiar with Git. If i ran this command 2 weeks ago, am I running the correct version then ?

Yeah you should be good to go, just add the test flag to your constructor. You'll know it's working if it returns an empty response. You can view the changelog on the other branch and monitor major changes on the releases page. Cheers!