__________     __ __     __  _______    ________
  / ____/ __ \   / // /    / / / /  _/ |  / / ____/
 / / __/ / / /  / // /_   / /_/ // / | | / / __/
/ /_/ / /_/ /  /__  __/  / __  // /  | |/ / /___
\____/\____/     /_/    /_/ /_/___/  |___/_____/

 --- A GOPHER-LIKE INTERFACE FOR HIVE BLOCKCHAIN ---

Looking for arbitrage opportunies with JavaScript library ccxt supporting 70+ exchanges

BY: @codewithcheese | CREATED: Sept. 24, 2017, 1:03 p.m. | VOTES: 17 | PAYOUT: $54.30 | [ VOTE ]

[IMAGE: https://i.imgur.com/gfU1At9.jpg]

These days with so many alt-currencies and so many exchanges there is bound to be potential arbitrage opportunities, however identifying and acting on those opportunities is a monumental task.

To be competitive you have to automate. I've been looking through GitHub to see what code is publicly available when I discovered ccxt. https://github.com/ccxt-dev/ccxt#ccxt--cryptocurrency-exchange-trading-library

A hugely impressive code base that supports 70+ exchanges.

It's written in JavaScript for Node.js but they have transpiled versions for both Python and PHP. Here's a list of the features.

> * support for many exchange markets, even more upcoming soon
> * fully implemented public and private APIs for all exchanges
> * all currencies, altcoins and symbols, prices, order books, trades, tickers, etc...
> * optional normalized data for cross-exchange or cross-currency analytics and arbitrage
> * an out-of-the box unified all-in-one API extremely easy to integrate
> * works in Node 7.6+, Python 2 and 3, PHP 5.3+, web browsers

OK, that looks great let's play around with it and see what it can do!

You will need to install the latest Node.js https://nodejs.org/en/download/ to run the code.

Download the latest source code from https://github.com/ccxt-dev/ccxt/archive/master.zip and unzip it into the directory you would like to work with.

Next, you will need to install it's requirements. Open up the command line, navigate to the directory you unzipped cctx and run npm install. This will take a few minutes to download the packages cctx relies on.

Notice that their is a script arbitrage-pairs.js in the examples/js/ directory.

From the command line run node examples/js/arbitrage-pairs.js hitbtc2 bittrex poloniex. This will grab all the supported pairs supported by HitBTC Bittrex and Poloniex. Why those 3? Because they support trading STEEM!

Here is the output.

symbol hitbtc2 bittrex poloniex 1ST/BTC hitbtc2 bittrex 1ST/ETH hitbtc2 bittrex ADX/ETH hitbtc2 bittrex AEON/BTC hitbtc2 bittrex AMP/BTC hitbtc2 bittrex poloniex ANT/BTC hitbtc2 bittrex ARDR/BTC hitbtc2 bittrex poloniex BCH/BTC hitbtc2 bittrex poloniex BCH/ETH hitbtc2 bittrex poloniex BCH/USDT bittrex poloniex BCN/BTC hitbtc2 poloniex BCY/BTC bittrex poloniex BLK/BTC bittrex poloniex BNT/BTC hitbtc2 bittrex BNT/ETH hitbtc2 bittrex BTC/USDT bittrex poloniex BTCD/BTC bittrex poloniex BTS/BTC bittrex poloniex BURST/BTC bittrex poloniex CFI/BTC hitbtc2 bittrex CFI/ETH hitbtc2 bittrex CLAM/BTC bittrex poloniex CVC/BTC bittrex poloniex CVC/ETH bittrex poloniex DASH/BTC hitbtc2 bittrex poloniex DASH/ETH hitbtc2 bittrex DASH/USDT bittrex poloniex DCR/BTC bittrex poloniex DCT/BTC hitbtc2 bittrex DGB/BTC bittrex poloniex DGD/BTC hitbtc2 bittrex DOGE/BTC hitbtc2 bittrex poloniex EDG/BTC hitbtc2 bittrex EMC/BTC hitbtc2 bittrex EMC2/BTC bittrex poloniex ETC/BTC hitbtc2 bittrex poloniex ETC/ETH hitbtc2 bittrex poloniex ETC/USDT bittrex poloniex ETH/BTC hitbtc2 bittrex poloniex ETH/USDT bittrex poloniex EXP/BTC bittrex poloniex FCT/BTC bittrex poloniex FLDC/BTC bittrex poloniex FLO/BTC bittrex poloniex FUN/BTC hitbtc2 bittrex FUN/ETH hitbtc2 bittrex GAME/BTC hitbtc2 bittrex poloniex GNO/BTC hitbtc2 bittrex poloniex GNO/ETH hitbtc2 bittrex poloniex GNT/BTC bittrex poloniex GNT/ETH bittrex poloniex GRC/BTC bittrex poloniex GUP/BTC hitbtc2 bittrex LBC/BTC bittrex poloniex LSK/BTC hitbtc2 bittrex poloniex LTC/BTC hitbtc2 bittrex poloniex LTC/USDT bittrex poloniex LUN/BTC hitbtc2 bittrex MAID/BTC hitbtc2 bittrex poloniex NAV/BTC bittrex poloniex NEOS/BTC bittrex poloniex NXC/BTC hitbtc2 bittrex poloniex NXT/BTC hitbtc2 bittrex poloniex OMG/BTC bittrex poloniex OMG/ETH hitbtc2 bittrex poloniex OMNI/BTC bittrex poloniex PAY/ETH hitbtc2 bittrex PINK/BTC bittrex poloniex POT/BTC bittrex poloniex PPC/BTC hitbtc2 bittrex poloniex PTOY/BTC hitbtc2 bittrex PTOY/ETH hitbtc2 bittrex QTUM/ETH hitbtc2 bittrex RADS/BTC bittrex poloniex REP/BTC hitbtc2 bittrex poloniex REP/ETH bittrex poloniex RLC/BTC hitbtc2 bittrex SBD/BTC hitbtc2 bittrex poloniex SC/BTC hitbtc2 bittrex poloniex SNGLS/BTC hitbtc2 bittrex SNT/ETH hitbtc2 bittrex STEEM/BTC hitbtc2 bittrex poloniex STRAT/BTC hitbtc2 bittrex poloniex SWT/BTC hitbtc2 bittrex SYS/BTC bittrex poloniex TIME/BTC hitbtc2 bittrex TIME/ETH hitbtc2 bittrex TKN/BTC hitbtc2 bittrex TRST/BTC hitbtc2 bittrex VIA/BTC bittrex poloniex VRC/BTC bittrex poloniex VTC/BTC bittrex poloniex WAVES/BTC hitbtc2 bittrex WINGS/BTC hitbtc2 bittrex XAUR/BTC hitbtc2 bittrex XCP/BTC bittrex poloniex XDN/BTC hitbtc2 bittrex XEM/BTC hitbtc2 bittrex poloniex XMR/BTC hitbtc2 bittrex poloniex XMR/ETH hitbtc2 bittrex XMR/USDT bittrex poloniex XRP/BTC hitbtc2 bittrex poloniex XRP/USDT bittrex poloniex XVC/BTC bittrex poloniex ZEC/BTC hitbtc2 bittrex poloniex ZEC/ETH hitbtc2 bittrex poloniex ZEC/USDT bittrex poloniex ZRX/BTC hitbtc2 poloniex ZRX/ETH hitbtc2 poloniex

As you can see cctx quickly grabbed a list of all the trading pairs supported by HitBTC, Bittrex and Poloniex.

Unfortunately cctx does not have an example to compare the prices. But looking at how well cctx is made I should be able to write an example to compare prices fair easily.

In the next post I will write a simple script to compare prices and find those profitable arbitrage opportunities.

Remember to up vote and follow so you don't miss out.

TAGS: [ #steemdev ] [ #cryptocurrency ] [ #bitcoin ] [ #trading ] [ #ethereum ]

Replies

@jabez518 | Sept. 24, 2017, 1:07 p.m. | Votes: 0 | [ VOTE ]

@jabez518 very informative article.

@minnowbooster | Sept. 24, 2017, 1:56 p.m. | Votes: 0 | [ VOTE ]

[IMAGE: http://minnowshares.net/upgoat/?user=codewithcheese&receiver=codewithcheese&value=1.37&hash=222]
@codewithcheese got you a $1.37 @minnowbooster upgoat, nice! (Image: pixabay.com)

Want a boost? Click here to read more!

@minnowbooster | Sept. 24, 2017, 2:16 p.m. | Votes: 0 | [ VOTE ]

[IMAGE: http://minnowshares.net/upgoat/?user=codewithcheese&receiver=codewithcheese&value=4.11&hash=242]
@codewithcheese got you a $4.11 @minnowbooster upgoat, nice! (Image: pixabay.com)

Want a boost? Click here to read more!

@nakamurasatoshi | Sept. 24, 2017, 3:17 p.m. | Votes: 1 | [ VOTE ]

Intriguing post - thanks @codewithcheese .

@rexpsunny | Sept. 24, 2017, 4:22 p.m. | Votes: 1 | [ VOTE ]

That's a great information.. Cheers

@steemitboard | Sept. 24, 2017, 4:44 p.m. | Votes: 0 | [ VOTE ]

Congratulations @codewithcheese! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

[IMAGE: https://steemitimages.com/70x80/http://steemitboard.com/notifications/voted.png] Award for the number of upvotes received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

> By upvoting this notification, you can help all Steemit users. Learn how here!

@steemitboard | Sept. 24, 2017, 8:49 p.m. | Votes: 0 | [ VOTE ]

Congratulations @codewithcheese! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

[IMAGE: https://steemitimages.com/70x80/http://steemitboard.com/notifications/votes.png] Award for the number of upvotes

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

> By upvoting this notification, you can help all Steemit users. Learn how here!

@fifelue | Dec. 27, 2017, 9:08 p.m. | Votes: 1 | [ VOTE ]

EtherDelta is a Goldmine, insane arbitrage opportunity https://steemit.com/gifto/@fifelue/tips-be-a-millionaire-using-arbitrage

@cmd-space | Feb. 16, 2018, 7:38 a.m. | Votes: 0 | [ VOTE ]

Great idea! Any plans to update this with a follow up post and walkthrough, @codewithcheese ?

@god-is-good | June 7, 2018, 4:11 a.m. | Votes: 0 | [ VOTE ]

Excellent!

[ BACK TO TRENDING ] [ BACK TO MENU ]
CMD>