Err 404 when buy,sell, etc..
See original GitHub issueI’m using local server on a Chrome browser to run the following code:
` const binance = require(‘./node-binance-api.js’);
binance.options({ APIKEY: ‘MY-API-KEY’, APISECRET: ‘*MY-SECRET-API’, useServerTime: false, // If you get timestamp errors, synchronize to server time at startup test: true // If you want to use sandbox mode where orders are simulated });
binance.prices(‘ETHBTC’, (error, ticker) => { console.log("Price of ETHBTC: ", ticker.ETHBTC); });
var quantity = 0.05 ; binance.marketBuy(“ETHBTC”, quantity); `
I’ve gotten the binance.prices to work using this wrapper, however, whenever there is a more secure network is needed, which involve my API-key or Secret-Key, i cannot seem to retrieve information.
My assumptions for this possibility:
- Chrome browser is not supported by binance api server
- My API-Key/Secret-Key are banned from binance api
- Code is not primed for more secure options
Let me know what you think. Thanks in advance!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top GitHub Comments
I’ve tried CORS browser extension to bypass some preflights with allow orgin headers, however, this only worked for “GET” functions. As soon as I attempted “POST”, I’ve tried adding headers that were shown in public api but this only resulted in errors of 400, 401, 404.
I am convinced you’re right, and I’m going to attempt server-side (if possible) rather than client-side.
Thank you for your answer. I might be back with an update on my situation.
I think people have had some success with electron, turning it into a desktop app https://electronjs.org But I haven’t tested it for that