aloysius-pgast / crypto-exchanges-gateway Goto Github PK
View Code? Open in Web Editor NEWYour gateway to the world of crypto !
Your gateway to the world of crypto !
good proyect ! It plans to add more trading options ex: trailing stop, stop limit?
Is there a way to add user authentication or a password to lock down of the application? I would like to have so form of security that would allow me run the instance non-stop, is this possible?
What a cool project, congratulations.
i want to have the feature to watch all the open orders besides starred pairs and also support for BNB pairs on binance.
best regards.
hi aloysius-pgast,
great gateway you have here. Cool project and would like to see it evolve.
I gave it a try and have a question:
I used docker+kinematic to run the UI website. Is there a way to store user settings so that when I restart the kinematic instance, I don't have to do it all over again?
User settings to be stored would be for example:
thanks!
Hello
I've tried as you suggested the RPC connection but I after calling client.subscribeToKlines(this.exchange, [symbolNormalized], timeframe)
nothing more happens, it seems blocked.
This is the code,
// connection to gateway was lost (reconnection will be automatic)
this.client.on('disconnected', (data) => {
log.info(`We've been disconnected : ${JSON.stringify(data)} [reconnection will be automatic]`);
});
this.client.on('ready', (data) => {
log.info(`Ready to subscribe : ${JSON.stringify(data)}`);
for (let symbol of this.symbols) {
const symbolNormalized = stringUtils.getSymbolForExchange(symbol, 'ceg')
for (let timeframe of this.timeframes) {
log.info(`Subscribing to ${symbolNormalized} for ${timeframe}...`)
client.subscribeToKlines(this.exchange, [symbolNormalized], timeframe);
}
}
});
this.client.on('kline', (data) => {
log.debug('WS CEG MSG:' + data);
const datajson = JSON.parse(data)
if (datajson && datajson.d) {
if (datajson.d.data.closed === false) {
log.debug('WS CEG data but NOT closed Candle')
}
if (datajson.d.data.closed === true) {
log.info('WS CEG of CLOSED Candle:' + datajson)
//const pairReversed = stringUtils.getSymbolForExchange(symbol, 'ceg')
const evt_name = 'candle_' + _this.symbols + '-' + datajson.d.interval
// adding data interval/timeframe to data candle
datajson.d.data['timeframe'] = datajson.d.interval
log.info(_this.symbols + ' - CANDLE close:' + JSON.stringify(datajson.d.data + ' emitting event candle:' + evt_name));
vorpal.log(_this.symbols + ' - CANDLE close:' + JSON.stringify(datajson.d.data + ' emitting event candle:' + evt_name));
_this.emit(evt_name, datajson.d.data);
}
}
});
On log I can see just:
2019-09-07T21:09:24.433Z info: We've been disconnected : {"connectionId":1,"code":1006,"reason":""} [reconnection will be automatic]
2019-09-07T21:09:38.424Z info: We connected/reconnected : {"connectionId":2}
I tried with two pairs and timeframes: BTC/USDT ETH/USDT and timeframes 1m 5m
But It's blocked to the first subscribing.
I tried switching to the gateway to develop
branch as suggested on the client README but not too much differences
Have a suggestion? Thanks!
I am getting a lot of the following warnings:
|WARN| Could not query exchange for pair <pair key> (might be an invalid pair) : err = 'There was an error invoking Hub method 'c2.queryexchangestate'.'
They happen after the gateway has already been able to subscribe to the pairs so I already have valid data. The problem is the data that I have received and think is currently valid is outdated.
Do you have an idea of why this is happening or how to fix it?
Would it be possible to emit a notification on the websocket to let the subscribed party know that the gateway is not able to query the exchange for that pair until updated data starts flowing again?
Hello,
I'm trying using this interestng gateway. I'm using just Binance and I'm interested to WS klines only at the moment.
When my bot start using some pairs and, for every pairs, 3 or 4 timeframes I get this from the gateway log (with less combinations no warning at the moment):
(node:4383) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 ticker listeners added. Use emitter.setMaxListeners() to increase limit (node:4383) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 orderBook listeners added. Use emitter.setMaxListeners() to increase limit (node:4383) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 orderBookUpdate listeners added. Use emitter.setMaxListeners() to increase limit (node:4383) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 trades listeners added. Use emitter.setMaxListeners() to increase limit (node:4383) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 kline listeners added. Use emitter.setMaxListeners() to increase limit
Threre is something that I can set on configuration to avoid eventual problem of leak memory?
Thanks in advance
I'm currently working on this project...I need to add some new features to it..how can I use dummy ethers to do a transaction?
Hello, i speak spanish, it would be cool to being able to select a different language on the UI.
When I run npm install, I got a following error.
2 info using [email protected]
3 info using [email protected]
8271 error [email protected] install: node-pre-gyp install --fallback-to-build
8271 error Exit status 1
Please help me to install crypto-exchanges-gateway
This project seems very similar to ccxt - have you tried collaborating?
Hi - First of all, this is wonderful piece of work, thanks for extending it to community. I have gone through the installation instructions & did setup in my ubuntu machine(localhost), went fine with no errors, Was able to build UI & triggered it. But in UI, i can only view "order books" & "Prices" in all exchanges, not more than that. Where as in Demo Link, I can see we have many other options such as "New Order", "My Order", "MY balances"
Thanks,
Lokesh
hello, i can't see any BNB pair, what i am doing wrong? I need VEN-BNB etc.
Hey there,
Im trying to get the gateway running im running into an error it says something like this:
/home/usr/Downloads/crypto-exchanges-gateway-master/app/default-ccxt-client.js: 44
this.ccxt = new ccxtccxtExchangeId;
TypeError: ccxt[ccxtExchangeId] is not a constructor
I am just starting to breach more complicated codes such as this one, could someone help me?
I would like to use local ports other than 8000 and 8001 for the http and ws servers of the docker container.
But when I run docker run --rm -p 8100:8100 -p 8101:8101 --name ceg apendergast/crypto-exchanges-gateway
, the container starts but prints the following on the console.
1586176403316|WARN|HTTP server is alive on *:8000
1586176403317|WARN|WS server is alive on *:8001
When run the docker container with my key and my secret and I subscribe to a pair's trades, I get notifications for, I think, all the trades that take place for that pair.
Would it be possible to only emit notification of trades that correspond to orders placed by me?
Can these be prioritized?
Does this support building klines for exchanges that only provide raw trades (e.g bitstamp)? Curious if this can help bridge the gap.
The amount shown is the order amount. Would it be possible to add a column for the filled amount?
Hello, a cool feature is to consolidate all your balance on the different exchanges, so if you want to buy XRP you have a buying power of 3 BTC (the total BTC amount on Bittrex, Binance, Poloniex), and you buy XRP in all of them at once.
You can put buy orders at once from one single click.
Better to manage "coins" than managing Exchanges.
Hi,
Thank you for this awesome tool..it is looking very promising!
Do you know how I can fix this timestamp issue I am getting with Binance please?
My timezone is CEST..
1507337786396|ERROR|{"exchange":"binance","api":"allOrders","pair":"BTC-CTR"} => {"code":-1021,"msg":"Timestamp for this request is not valid."}
Team,
Is it possible to add a portfolio that display your holdings with profits/losses with trends for the coin purchased or sold.
Thanks
Team,
I have installed the developer version and it was working fine, but now binance stopped working, bittrex and poloniex are still working properly, any suggestions?
Thanks
it would be cool to being able to select the starred pairs on my trades page, so you can check all your trades on example TRX/ETH without having to scroll all the trades below the open orders.
Would it be possible to add PancakeSwap as an exchange (even if it's just for price check alerts)?
Also, can you add a BSC donation address?
Thanks in advance
Hello,
Just a question regarding the best approach on getting data form crypto exchange gateway.
My need is to get just close candles and when a new candle (close) trigger a stragegy is applied to the candles. I want to monitor some pairs (10-15) with different timeframes (3-4).
Is there sense to listen to WS RPC klines, currently discarding data for not closed klines, for higher timeframes?
1d o 1w or why not 1m ...maybe there is no sense to use websocket in this case, isn't it?
Above all because there could be disconnections ..and for 1w candles, for example, I could lose the closing data.
Maybe in this scenario WS is good for timeframes till 1d?
Thanks for your eventual suggestions
When placing a buy or sell order on Binance I receive the error Invalid Lot Size. This doesn't happen on all pairs, only pairs in which the minimum order price has a minimum tick requirement.
On the Binance market ETH/TRX, the minimum price is 0.00000001, however on ETH/DGD, the minimum price is 0.00001. Since the crypto-exchanges-gateway defaults to including 8 ticks (decimals) on all pairs, Binance rejects orders with Invalid Lot Size if the pair has a minimum tick for the price.
Hi, I have all exchanges working except Okex. Do you also have the same problem? Below is my environment:
In UI, under Okex exchange:
Hi, is it possible to add 'cfg.exchanges.kucoin.password' into environment variables? Since it's required for Kucoin module.
Hi,
I am looking to auto sell any btc or ether thats been sent into our binance account is this possible with this script?
you login on web access, and UI loads from a different JSON FILE, i think it should be very easy to made. very useful at least to me, i can have different accounts (API) and i can access through a login.
Line 182 websocket connection.js file
let interval = setInterval(function () {
if (WebSocket.OPEN != _ws.readyState) {
clearTimeout(interval);
return;
}
if (!_ws.isAlive) {
if (debug.enabled) {
debug("WS (%s) timeout : timeout = %d", self._uri, self._pingTimeout);
}
_ws.terminate();
clearTimeout(interval);
return;
}
_ws.isAlive = false;
if (debug.enabled) {
debug("Sending WS PING (%s)", self._uri);
}
_ws.ping('', true, true);
}, self._pingTimeout);
You are calling setInterval but you are calling clearTimeout which may or may not be compatible all the time
A few questions
What is the purpose of this? ignoreCloseEvent, you are setting it to true in the constructor and finalize but setting it to false inside open callback. The only purpose I see is when the close event is fired, you are checking if you should ignore it and return prematurely, when would you ever enter that if statement?
Also why do we need to skipCloseEvent
No need to add doRetry either :)
Another thing you might wanna consider is doing a noop ping instead of the true you are sending currently, seems to be standard practice https://github.com/jaggedsoft/node-binance-api/blob/master/node-binance-api.js#L285
Also can you replace your function callbacks with arrow functions, it will replace all the self=this calls
A cool feature is one click withdrawal on balance page, for example you click on XRP and sends the XRP from Binance to Poloniex, it would be cool to cross the coins from exchange to another with just one click.
Would be great if you could enable the tradingview widget draw toolbar.
If you agree, you can add this option:
"hide_side_toolbar": false,
to:
new TradingView.widget({
in file ui/src/components/CandleSticks/CandleSticks.js
Hello,
Nice project. I think this has great potential. Putting everything in one place really simplifies the development process.
In the future, can you please also enable websockets for orderbook updates? I know node.bittrex.api
has good support for it. For a working example, please take a look at my code: https://github.com/rickyhan/bittrex-orderbook-importer
When updating pair in url, selected values in pair chooser do not reflect the new pair unless a refresh is done
When opening the Order Book the Last Trades section is showing the wrong colors. Buys are showing as red instead of green and vice versa.
This is on the development version cloned as of 2/2/2018.
to have a better total in the account, example i have 10 open orders with a market value of 0.10 ether, adding that to the balance as total value of holdings, like Poloniex have in the history page.
i can-t access mytrades on developer branch edition, whan i am making wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.