Bitcoin Forum
July 08, 2024, 05:27:32 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Excel Spreadsheet Cryptos live quote JSON / API…  (Read 375 times)
Greg2000 (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
January 17, 2018, 09:04:00 AM
 #1

Hi,

If it can help some of you I have prepared an Excel spreadsheet to get cryptos live quotes from various Crypto’s exchanges.

I have prepared this spreadsheet thanks to tricks found here and there and I tried to put them together to make it easy for your guys to use them and develop your own spreadsheets.

For informations, my spreadsheet is available in my little forum. I keep it in my little forum to make it easier to share and update my tools (all GiG content is completely free, you just need to register to be available to download the file). Link at the bottom of the post.

In GiG forum you can also find my Excel Spreadsheet with my Crypto Portfolio tracker which is using data and queries from CoinMarketCap.


Single crypto live quote
==========================================================

Basically, you can get the live quotes for individual cryptos, here a basic example:

Screenshot:
https://image.ibb.co/mHLT96/S1.png


I have included the live quotes for:
- Bittrex
- Bitfinex
- Binance
- CryptoCompare (thanks to cryptocompare you can get the quotes from a huge list of exchanges, but if I am correct, quotes are updated every 10 minutes). But it can be useful to have it available ;-)

For the technical part here are the links used to get the quotes:

- Bittrex:
https://bittrex.com/api/v1.1/public/getticker?market=

- Bitfinex:
https://api.bitfinex.com/v2/ticker/t

- Binance:
https://api.binance.com/api/v1/ticker/price?symbol=

- CryptoCompare:
https://min-api.cryptocompare.com/data/price?fsym=

To work correctly, you have to allow macros in Excel (the source code of those macros is visible and I tried to made it clear so as for you to adapt it).

For those individual pairs live quotes, I have coded the macro as a public function which can be used as a formula directly in Excel without having to modify the code. The formula looks like this:

=MyJSON( Base, Quote, Exchange, Volatile)

- Base is the base part of your instrument (for BTCUSD it would be BTC)
- Quote is the second part of your instrument (for BTCUSD it would be USD)
- Exchange is the exchange you want to use to get your quotes (for CryptoCompare you have to add the exchange used by cryptocompare)
- Volatile is just a reference to the cell A1. Explanation below.

In Excel, public functions are not volatile (not updated live or when a cell is modified) and if you set them as volatile, each time you modify a cell, the spreadsheet is recalculated which can be tricky in term of resources usage (CPU…). So, to make it easier to refresh the quotes, I have included a button which refresh the quotes when you click on it. Off course with further development you can program the macro to refresh the quotes every xx minutes…

So to get updates, just click the button and just let A1 as the volatile reference.


List and tickers of Cryptos from Exchanges
==========================================================

I have also included some macros to get the tickers from 3 exchanges:
- Bittrex
- Bitfinex
- Binance

I have associated the macro with some buttons, and so onclick the cryptos list are updated, here the example with Bittrex:

Screenshot:
https://image.ibb.co/dprDbm/S2.png


For the technical part here are the links used to get the quotes:

- Bittrex:
https://bittrex.com/api/v1.1/public/getmarketsummaries

- Bitfinex:
https://api.bitfinex.com/v1/symbols
https://api.bitfinex.com/v2/tickers?symbols=

- Binance:
https://api.binance.com/api/v1/ticker/allPrices


Json
==========================================================

The data are collected from the various Exchange’s API in a Json format which is not readable as it in Excel. So, we have to format the data with the macros to get something readable with Excel.

Some of those macros are formatting the “Json” directly, and some of them are using a library to do the job. The library used is the one which you can find at this link:

https://github.com/VBA-tools/VBA-JSON
The library needs to use a reference in Excel VBA which you can activate: Microsoft scripting runtime. (Tools > references > select)

Key reference for Json: JsonConverter.ParseJson, Parse Json,


You can use those examples to extend the quotes to other exchanges.

Link:
https://www.greed-is-good.com/forum/viewtopic.php?p=1855#p1855

PS: all macros codes are completely readable for review.
Regards,
G
MaxGiant57001
Newbie
*
Offline Offline

Activity: 53
Merit: 0


View Profile
January 17, 2018, 01:05:22 PM
 #2

It would be good if you are including few more exchanges and cryptos and showing their comparisons in pie charts.
moinuddin14
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
January 17, 2018, 03:05:27 PM
 #3

Hi,

If it can help some of you I have prepared an Excel spreadsheet to get cryptos live quotes from various Crypto’s exchanges.

I have prepared this spreadsheet thanks to tricks found here and there and I tried to put them together to make it easy for your guys to use them and develop your own spreadsheets.

For informations, my spreadsheet is available in my little forum. I keep it in my little forum to make it easier to share and update my tools (all GiG content is completely free, you just need to register to be available to download the file). Link at the bottom of the post.

In GiG forum you can also find my Excel Spreadsheet with my Crypto Portfolio tracker which is using data and queries from CoinMarketCap.


Single crypto live quote
==========================================================

Basically, you can get the live quotes for individual cryptos, here a basic example:

Screenshot:



I have included the live quotes for:
- Bittrex
- Bitfinex
- Binance
- CryptoCompare (thanks to cryptocompare you can get the quotes from a huge list of exchanges, but if I am correct, quotes are updated every 10 minutes). But it can be useful to have it available ;-)

For the technical part here are the links used to get the quotes:

- Bittrex:
https://bittrex.com/api/v1.1/public/getticker?market=

- Bitfinex:
https://api.bitfinex.com/v2/ticker/t

- Binance:
https://api.binance.com/api/v1/ticker/price?symbol=

- CryptoCompare:
https://min-api.cryptocompare.com/data/price?fsym=

To work correctly, you have to allow macros in Excel (the source code of those macros is visible and I tried to made it clear so as for you to adapt it).

For those individual pairs live quotes, I have coded the macro as a public function which can be used as a formula directly in Excel without having to modify the code. The formula looks like this:

=MyJSON( Base, Quote, Exchange, Volatile)

- Base is the base part of your instrument (for BTCUSD it would be BTC)
- Quote is the second part of your instrument (for BTCUSD it would be USD)
- Exchange is the exchange you want to use to get your quotes (for CryptoCompare you have to add the exchange used by cryptocompare)
- Volatile is just a reference to the cell A1. Explanation below.

In Excel, public functions are not volatile (not updated live or when a cell is modified) and if you set them as volatile, each time you modify a cell, the spreadsheet is recalculated which can be tricky in term of resources usage (CPU…). So, to make it easier to refresh the quotes, I have included a button which refresh the quotes when you click on it. Off course with further development you can program the macro to refresh the quotes every xx minutes…

So to get updates, just click the button and just let A1 as the volatile reference.


List and tickers of Cryptos from Exchanges
==========================================================

I have also included some macros to get the tickers from 3 exchanges:
- Bittrex
- Bitfinex
- Binance

I have associated the macro with some buttons, and so onclick the cryptos list are updated, here the example with Bittrex:

Screenshot:



For the technical part here are the links used to get the quotes:

- Bittrex:
https://bittrex.com/api/v1.1/public/getmarketsummaries

- Bitfinex:
https://api.bitfinex.com/v1/symbols
https://api.bitfinex.com/v2/tickers?symbols=

- Binance:
https://api.binance.com/api/v1/ticker/allPrices


Json
==========================================================

The data are collected from the various Exchange’s API in a Json format which is not readable as it in Excel. So, we have to format the data with the macros to get something readable with Excel.

Some of those macros are formatting the “Json” directly, and some of them are using a library to do the job. The library used is the one which you can find at this link:

https://github.com/VBA-tools/VBA-JSON
The library needs to use a reference in Excel VBA which you can activate: Microsoft scripting runtime. (Tools > references > select)

Key reference for Json: JsonConverter.ParseJson, Parse Json,


You can use those examples to extend the quotes to other exchanges.

Link:
https://www.greed-is-good.com/forum/viewtopic.php?p=1855#p1855

PS: all macros codes are completely readable for review.
Regards,
G


1ST EVER CAR TITLE LOAN PLATFORM ON BLOCKCHAIN
SHIFT.CASH     █ █ ██████████████████████████████████████ █ █     [ JOIN NOW ]
Website       Whitepaper       Telegram       Facebook       Twitter
Greg2000 (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
January 18, 2018, 08:09:37 AM
 #4

Hi,
You are free to help to improve the spreadsheet, I tried to comment/explain the process as much as possible to make the macro easy to use and to duplicate to add other exchanges.

Not that I don’t want to do it, but there are so many exchanges that I cannot answer to every single request.

Hope you like it ;-)
Best,
G
Beeeman
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
November 29, 2018, 06:45:54 PM
 #5

Hi Greg,
sorry to bother you but I'd love to try out your spreadsheet but I'm unable to register on the GIG website - https://www.greed-is-good.com/forum/viewtopic.php?f=85&t=16

I've tried 3 times to register but failed and I don't know why - I used different email addresses and verification was not sent to any of the email addreses.

Can you give me access to it via some other method ?

many thanks

B
ieselcuk
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
March 09, 2019, 04:07:46 PM
 #6

Hello Greg,

There is an error about other website register and login. I try it again and again.
Is it possible that could you send the excel file to my personal e-mail.
I would be grateful.

Thank you very very much.

Regards.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!