All Projects → aloysius-pgast → Crypto Exchanges Gateway

aloysius-pgast / Crypto Exchanges Gateway

Your gateway to the world of crypto !

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Crypto Exchanges Gateway

Cryptocurrency Portfolio
Google Sheets automatic creation with Google Apps Script (GAS) for managing a cryptocurrency tracking spreadsheet with multi exchanges
Stars: ✭ 134 (-60.93%)
Mutual labels:  api, cryptocurrency, poloniex, binance, bittrex
crypto-database
Database for crypto data, supporting several exchanges. Can be used for TA, bots, backtest, realtime trading, etc.
Stars: ✭ 72 (-79.01%)
Mutual labels:  trading, poloniex, bittrex, binance
Cryptotrader
A responsive dynamic webapp to trade cryptopairs on the most prominent exchanges
Stars: ✭ 118 (-65.6%)
Mutual labels:  api, poloniex, trading, bittrex
Python Poloniex
Poloniex API wrapper for Python 2.7 & 3
Stars: ✭ 557 (+62.39%)
Mutual labels:  api, cryptocurrency, poloniex, trading
Cryptofeed
Cryptocurrency Exchange Websocket Data Feed Handler
Stars: ✭ 643 (+87.46%)
Mutual labels:  cryptocurrency, trading, binance, bittrex
Arbitragebot
Arbitrage bot that currently works on bittrex & poloniex
Stars: ✭ 141 (-58.89%)
Mutual labels:  cryptocurrency, poloniex, trading, bittrex
Coinnect
Coinnect is a Rust library aiming to provide a complete access to main crypto currencies exchanges via REST API.
Stars: ✭ 130 (-62.1%)
Mutual labels:  cryptocurrency, poloniex, trading, bittrex
Cryptotik
deprecated
Stars: ✭ 78 (-77.26%)
Mutual labels:  cryptocurrency, poloniex, binance, bittrex
Stocklook
crypto currency library for trading & market making bots, account management, and data analysis
Stars: ✭ 119 (-65.31%)
Mutual labels:  cryptocurrency, poloniex, trading, bittrex
My Token
📈Track token prices of your favorite exchanges in terminal!
Stars: ✭ 141 (-58.89%)
Mutual labels:  cryptocurrency, poloniex, binance, bittrex
Exchangesharp
ExchangeSharp is a powerful, fast and easy to use .NET/C# API for interfacing with many crypto currency exchanges. REST and web sockets are supported.
Stars: ✭ 489 (+42.57%)
Mutual labels:  api, cryptocurrency, poloniex, bittrex
Ccxt.net
CCXT.NET – CryptoCurrency eXchange Trading Library for .NET
Stars: ✭ 89 (-74.05%)
Mutual labels:  api, cryptocurrency, trading
Python Binance Chain
Binance Chain Exchange API python implementation for automated trading
Stars: ✭ 96 (-72.01%)
Mutual labels:  api, cryptocurrency, binance
Binance.api.csharp.client
C#.NET client for Binance Exchange API.
Stars: ✭ 98 (-71.43%)
Mutual labels:  api, cryptocurrency, binance
Bittrex Signalr Client
Node.js implementation of SignalR protocol tailored for Bittrex exchange
Stars: ✭ 37 (-89.21%)
Mutual labels:  api, cryptocurrency, bittrex
Coinbase Pro Node
Coinbase Pro API written in TypeScript and covered by tests.
Stars: ✭ 116 (-66.18%)
Mutual labels:  api, cryptocurrency, trading
Binance
A .NET Standard Binance API library.
Stars: ✭ 199 (-41.98%)
Mutual labels:  api, cryptocurrency, binance
Bittrex.net
A C# .Net wrapper for the Bittrex web API including all features easily accessible and usable
Stars: ✭ 131 (-61.81%)
Mutual labels:  api, cryptocurrency, bittrex
Ccxt Rest
Open Source Unified REST API of 100+ Crypto Exchange Sites (18k+ docker pulls) - https://ccxt-rest.io/
Stars: ✭ 210 (-38.78%)
Mutual labels:  api, cryptocurrency, trading
guncontrol
🔔 GunControl • Custom *nix launcher for GunBot
Stars: ✭ 16 (-95.34%)
Mutual labels:  trading, poloniex, bittrex

crypto-exchanges-gateway

Your gateway to the world of crypto !

Disclaimer

This project cannot be considered in any way as trading advice.

Use it at your own risks and be careful with your money ;)

Faq

  • Does it support real-time data ?

Yes, gateway provides a WS endpoint. See video explaining how to create custom WS streams

  • What about ccxt ?

ccxt is a very nice project which provides a library to connect to multiple exchanges (php,js,python). When I started, I wasn't aware of the project. While ccxt aims at providing a library, I want to offer an http gateway as an independant service to be used by any REST client (so virtually any language).

Btw, ccxt library is now used to interface with some exchanges ;)

  • What is the monthly fee for the service ?

There is no monthly fee. It's free since you will be the one running the service on your own server

  • Where is your service hosted ?

This is a self-hosted service. You need to install it on your own server

  • I saw you are accepting donations. What extra service will I get for a donation ?

Besides the privilege to go to bed, knowing that you did the right thing ? Not much

What it does

  • Provides a unified REST API to various exchanges (can be used to automate trading or build bots)
  • Handles authentication so that on client side you can concentrate on what really matters
  • Implements rate limiting when forwarding requests to remote exchanges
  • Provides a REST API to send push notifications using PushOver
  • Provides a basic UI which implements most API calls (see documentation in doc directory)
  • Provides WS access for real-time data (tickers, order books & trades, see documentation in doc directory and video explaining how to create custom WS streams to multiplex data from multiple exchanges)
  • Access to a portfolio portfolio overview across all exchanges with estimated value in USD
  • Advanced alerting system

See a live demo at https://mpe-demo.crazyme.net/ui/

Of course, above demo does not use any valid user/token. This means the following :

  • everything related to price & order book is populated with real data
  • the list of open/completed orders is filled with random data
  • the list of balances is filled with random data
  • new orders won't be actually executed ;)

In order to have a full experience, just follow installation steps

How to use it

Install it wherever you want and start sending requests from your own program

  • it can be hosted on a VM in the cloud
  • it can be installed at home, on a Raspberry Pi

Just use you favorite language (python, javascript, ruby, bash, ...) to send request to the gateway. Your own service, your own rules !

A Node.js client is available here or as a npm package

Available Exchanges

Currently supports for following exchanges :

Following API are currently supported :

  • Retrieve pairs
  • Retrieve tickers
  • Retrieve order book
  • Retrieve last executed trades
  • Retrieve klines (charts data)
  • List open orders
  • List closed orders
  • Retrieve a single order
  • Test an order (to ensure quantity and price match exchange filters)
  • Create an order
  • Retrieve balances

See documentation in doc directory for an overview of each REST API

See documentation in doc directory for a description of the supported websocket protocol (similar to JSON-RPC)

See documentation in doc directory for informations regarding unit tests

Alerts

Have you ever wanted to receive an alert in case ALL of the following conditions are met :

  • NEO-USDT price in range [120, 135] on Binance
  • NEO-BTC price on Bittrex < 0.010
  • NEO price in MarketCap module > 125$

Probably not ;) Anyway, you will now be able to define this kind of custom alerts. See documentation in doc directory

Limitations

  • Margin trading is not supported (and is unlikely to be)
  • Withdrawal is not supported (and is unlikely to be)
  • Stop loss & trailing stop loss are not supported for the moment (although you can expect support in the future !)

Other services

MarketCap

MarketCap module supports :

  • Tickers

See documentation in doc directory for an overview of each API

Push Over

PushOver module supports :

  • Push notifications

See documentation in doc directory for an overview of each API)

Rate limiting

Rate limiting is implemented when required by exchange thanks to Bottleneck

Installation

  • Install dependencies
npm install
  • Copy sample config
cp config/config.sample.json config/config.json

Check documentation in doc directory for detailed information on each config section

  • Start gateway
node gateway.js
  • Build UI

If you want to use the UI, follow these steps to build the UI before starting the gateway:

cd ui
npm install && ./rebuild-ui
  • Check which exchanges are enabled

Open http://127.0.0.1:8000/exchanges/ in your browser. You should see JSON content such as below :

["binance","bittrex","poloniex","kucoin"]

By default, only public API will be enabled. In order to access trading/private API, you need to update config.json with appropriate user and secret provided by exchange (check documentation in doc directory )

  • Check BTC & ETH prices using MarketCap module

Open http://127.0.0.1:8000/marketCap/tickers?symbols=BTC,ETH in your browser. You should see JSON content such as below :

[
    {
        "symbol":"BTC",
        "name":"Bitcoin",
        "circulating_supply":17372012,
        "price_usd":6406.1049,
        "percent_change_1h":-0.08,
        "percent_change_1d":-0.08,
        "percent_change_7d":-0.15,
        "volume_24h_usd":3120534126.1266,
        "lastUpdated":1542009997,
        "market_cap_usd":111286930723.4185,
        "rank":1,
        "price_btc":1
    },
    {
        "symbol":"ETH",
        "name":"Ethereum",
        "circulating_supply":103150460,
        "price_usd":210.4854,
        "percent_change_1h":-0.39,
        "percent_change_1d":-0.39,
        "percent_change_7d":-0.8,
        "volume_24h_usd":1294093048.2094,
        "lastUpdated":1542009997,
        "market_cap_usd":21711669585.6914,
        "rank":2,
        "price_btc":0.032857
    }
]
  • Place an order to buy 1 NEO at 0.0040BTC on Bittrex (assuming you have enough funds)

Execute the following in a terminal :

curl -X POST 'http://127.0.0.1:8000/exchanges/bittrex/openOrders?pair=BTC-NEO&quantity=1&targetRate=0.0040'

You should see JSON content such as below :

{"orderNumber":"8bc49a59-1056-4c20-90f2-893fff2be279"}
  • Cancel above order (assuming order still exists)

Execute the following in a terminal :

curl -X DELETE 'http://127.0.0.1:8000/exchanges/bittrex/openOrders/8bc49a59-1056-4c20-90f2-893fff2be279'

You should see JSON content such as below in case order is valid :

{}

Docker

See this video to know how to be ready to trade in less then 3 minutes using Docker & Kitematic

A docker image is available at https://hub.docker.com/r/apendergast/crypto-exchanges-gateway/

  • Pull image
docker pull apendergast/crypto-exchanges-gateway
  • Run image
docker run --rm -p 8000:8000 -p 8001:8001 --name ceg apendergast/crypto-exchanges-gateway

You should then be able to access service on http://127.0.0.1:8000

WS endpoint will be available on ws://127.0.0.1:8001

  • Check which exchanges are enabled

Open http://127.0.0.1:8000/exchanges/ in your browser. You should see JSON content such as below :

["binance","bittrex","kucoin","okex","poloniex"]

By default, only public API will be enabled. In order to access trading/private API, you need to pass environment when creating container. Following environment variables are available :

  • cfg.logLevel : log level
  • cfg.listen.externalEndpoint : used to indicates the external endpoint used to reach http socket, in case gateway is running behing a proxy
  • cfg.listenWs.externalEndpoint : used to indicates the external endpoint used to reach ws socket, in case gateway is running behing a proxy
  • cfg.sessions.maxSubscriptions : maximum number of subscriptions allowed for a given session (optional, default = 0, no maximum)
  • cfg.sessions.maxDuration : maximum duration in second for a given session (optional, default = 0, no maximum)
  • cfg.auth.apikey : API Key used to protect access
  • cfg.ui.enabled : enable/disable UI (value should be set to 1 to enable UI, 0 to disable UI)
  • cfg.tickerMonitor.enabled : enable/disable Ticker Monitor module (value should be set to 1 to enable Ticker Monitor, 0 to disable Ticker Monitor) (default = 1)
  • cfg.marketCap.enabled : enable/disable MarketCap module (value should be set to 1 to enable MarketCap module, 0 to disable MarketCap module) (default = 1)
  • cfg.pushover.user : PushOver user key
  • cfg.pushover.token : PushOver token
  • cfg.exchanges.poloniex.enabled : value should be set to 1 to enable exchange, 0 to disable exchange (default = 1)
  • cfg.exchanges.poloniex.key : Poloniex user key
  • cfg.exchanges.poloniex.secret : Poloniex secret
  • cfg.exchanges.bittrex.enabled : value should be set to 1 to enable exchange, 0 to disable exchange (default = 1)
  • cfg.exchanges.bittrex.key : Bittrex user key
  • cfg.exchanges.bittrex.secret : Bittrex secret
  • cfg.exchanges.binance.enabled : value should be set to 1 to enable exchange, 0 to disable exchange (default = 1)
  • cfg.exchanges.binance.requirePair : value should be set to 0 to allow retrieving tickers/orders for all pairs at once, 1 to require pair for such operations (default = 0)
  • cfg.exchanges.binance.key : Binance user key
  • cfg.exchanges.binance.secret : Binance secret
  • cfg.exchanges.kucoin.enabled : value should be set to 1 to enable exchange, 0 to disable exchange (default = 1)
  • cfg.exchanges.kucoin.requirePair : value should be set to 0 to allow retrieving tickers/orders for all pairs at once, 1 to require pair for such operations (default = 0)
  • cfg.exchanges.kucoin.key : Kucoin user key
  • cfg.exchanges.kucoin.secret : Kucoin secret
  • cfg.exchanges.okex.enabled : value should be set to 1 to enable exchange, 0 to disable exchange (default = 1)
  • cfg.exchanges.okex.requirePair : value should be set to 0 to allow retrieving tickers/orders for all pairs at once, 1 to require pair for such operations (default = 0)
  • cfg.exchanges.okex.key : OKEx user key
  • cfg.exchanges.okex.secret : OKEx secret

If you don't want to use environment variables or want to customize config for a running container, you can create and edit custom_config/config.json

Examples :

Run container with Bittrex user/key environment variables

docker run --rm -p 8000:8000 -p 8001:8001 --name ceg -e cfg.exchanges.bittrex.key='abcdefghijkl' -e cfg.exchanges.bittrex.secret='123456789' apendergast/crypto-exchanges-gateway

Dependencies

This project was made possible thanks to following projects :

Donate

This project is a work in progress. If you find it useful, you might consider a little donation ;)

BTC: 163Bu8qMSDoHc1sCatcnyZcpm38Z6PWf6E

ETH: 0xDEBBEEB9624449D7f2c87497F21722b1731D42a8

NEO/GAS: AaQ5xJt4v8GunVchTJXur8WtM8ksprnxRZ

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].