WTB Make $10; Google Docs Feed

Status
Not open for further replies.

fible1

Well-known Member
Dash Core Team
Masternode Owner/Operator
May 11, 2014
710
722
163
I need to import "market cap" and "24 hour volume" feeds to my google docs spreadsheet for the cryptos Dash, Rads, VCash (formerly vanillacoin), Ether and Bitcoin. Anyone who can help me import the feeds will make a quick 10 bucks via skrill or paypal.

Please PM me if interested, I will post here when the job has been filled.

Pablo.
 

Balych

Active Member
Sep 12, 2015
365
211
113
Dash Address
Xba1ychX7CjgbRrCKE1LjHjT3jLUhcexs5
Free solution from here:
Using the awesome ImportJSON tool in combination with this wonderful script, I was able to get the data into a spreadsheet in a matter of minutes. Here’s how:
  1. Create a new Google Spreadsheet.
  2. Click on Tools -> Script Editor.
  3. Click Create script for Spreadsheet.
  4. Delete the placeholder content and paste the code from this script.
  5. Rename the script to ImportJSON.gs and click the save button.
  6. Back in the spreadsheet, in a cell, you can type “=ImportJSON()” and begin filling out it’s parameters.
Result using http://coinmarketcap.com/api/:


 

fible1

Well-known Member
Dash Core Team
Masternode Owner/Operator
May 11, 2014
710
722
163
@Baylch Thanks a bunch, I actually learned something, which is great. PM me your skrill address.

Pablo.
 
  • Like
Reactions: TheDashGuy

fible1

Well-known Member
Dash Core Team
Masternode Owner/Operator
May 11, 2014
710
722
163
I need some more help getting the DASH/BTC feed to gdocs from Poloniex.

6 USD bounty to anyone who can help, first come first serve. Make a quick few dollars (Skrill/PayPal).

Pablo.
 

raganius

cryptoPag.com
Foundation Member
Masternode Owner/Operator
Do you mean something like this?
Code:
=IMPORTDATA("https://poloniex.com/public?command=returnOrderBook&currencyPair=BTC_DASH&depth=1&now()")
or (maybe better)
Code:
=IMPORTDATA("https://poloniex.com/public?command=returnOrderBook&currencyPair=BTC_DASH")
also:
Code:
=IMPORTDATA("https://poloniex.com/public?command=returnTradeHistory&currencyPair=BTC_DASH&start=1464393600&end=1464573479")
* using the timestamp you can get at http://www.unixtimestamp.com

At least that's how I do it here.

* There is a list of poloniex api commands at https://poloniex.com/support/api
 
Last edited:

fible1

Well-known Member
Dash Core Team
Masternode Owner/Operator
May 11, 2014
710
722
163
Hey Ragnius :),
Thanks for your input. I have been fighting with that API and following that website for a few hours, it doesn't do what I need it to do (yet). I need the Dash price in BTC only and I can figure out how to separate it from all the other noise there, plus it's not updating too well. I suspect I may need to get the feed from a secondary source but have not yet found one that tracks Poloniex closley.

:)

Pablo.
 

raganius

cryptoPag.com
Foundation Member
Masternode Owner/Operator
Yes, because this command will pull all info from the api source. What I do, in order to filter it, is the following:

on a cell (say, C32) i put the command
=IMPORTDATA("https://poloniex.com/public?command=returnOrderBook&currencyPair=BTC_DASH&depth=1")

then, on other cells (say D33 and D34) I put:
=C32
=E32

finally, on (say E33 and E34) I put:
=MID(D33,12,10)
=MID(D34,9,10)

getting asks and bids.

But, normally I simply use
=IMPORTXML("http://coinmarketcap.com/currencies/dash/","//small[@class='text-gray']")
and
=IMPORTXML("http://coinmarketcap.com/currencies/dash/","//span[@class='text-large']")
importing data from the coinmarketcap

If there is a better sollution, me too, I'd like to know, as it will be very useful here ;)

edit, I can also use =IMPORTDATA("https://shapeshift.io/rate/dash_btc") sometimes.

this is also useful sometimes: =IMPORTDATA("https://www.dashwhale.org/api/v1/public") :D
 

fible1

Well-known Member
Dash Core Team
Masternode Owner/Operator
May 11, 2014
710
722
163
Hey,

I think I figured it out by using "return trade history" and just using the value for the last trade for my calculation. I have 2 problems with this approach:

1. I'm not sure how to make it auto update, beyond running an extension to reset the page every so often, which is working find so far so meh.
2. Its not very clean as I imported the last 200 trades as opposed to only the last trade. Will try to figure this out an post.

Please PM me your Skrill address, this bounty is filled.

Pablo.
 
  • Like
Reactions: raganius

raganius

cryptoPag.com
Foundation Member
Masternode Owner/Operator
Thank you, no need to worry about the bounty. Just please, keep us updated on any improvements on these data fetching techniques, because they are really very useful.

As for the auto update, I believe that a "loop" script would do the job, but I've got no idea how to create such scripts :)
 

fible1

Well-known Member
Dash Core Team
Masternode Owner/Operator
May 11, 2014
710
722
163
Will do. I'll burn some more hours on this, if I figure it out, I'll let you know :).

I used darkcoinprice.com for a very long time; its pricing algorithm used to very nearly match both polo and bitstamp, which makes the most sense as those are the most liquid exchanges for the two step exchange, to or from cash. Over the last few days they seem to have switched their feed and its messing with my results by around 5%. 5% is a lot when you are looking at any financial market so its driving me crazy.

I'll keep you in the loop.

Pablo.
 

Balych

Active Member
Sep 12, 2015
365
211
113
Dash Address
Xba1ychX7CjgbRrCKE1LjHjT3jLUhcexs5
Add new script ImportJSONUpdate:
Code:
function ImportJSONUpdate() {
  SpreadsheetApp.getActiveSheet().getRange('A1').setValue('=IMPORTJSON("https://poloniex.com/public?command=returnTradeHistory&currencyPair=BTC_DASH";"/rate,/amount";"noHeaders")');
}
Set up triggers:
  1. From the script editor, choose Resources > Current project's triggers.
  2. Click the link that says: No triggers set up. Click here to add one now.
  3. Under Run, select the name of function you want to trigger.
  4. Under Events, select either Time-driven or the Google App that the script is bound to (for example, From spreadsheet).
  5. Select and configure the type of trigger you want to create (for example, an Hour timer that runs Every hour or an On open trigger).
  6. Optionally, click Notifications to configure how and when you will be contacted by email if your triggered function fails.
  7. Click Save.
It will return last 200 trades, so you can calculate price by own method:

 
  • Like
Reactions: raganius

fible1

Well-known Member
Dash Core Team
Masternode Owner/Operator
May 11, 2014
710
722
163
(Edit) Looks great!

Thanks mate, you definitely know your spreadsheets :D.

Pablo.
 
Status
Not open for further replies.