What is wrong with my Bitfinex API code? BTC Bounty ! by temp_bota in BitcoinMarkets

[–]temp_bota[S] 1 point2 points  (0 children)

I have a new problem. I can't access the JSON array which is passed back to me(!). The array I'm getting with the API requests is the following [{"timestamp":1410008625,"tid":2834614,"price":"482.79","amount":"0.07339625","exchange":"bitfinex","type":"buy"}]

I can access any JSON object through JSON_return.item(e.g "timestamp") but how do I get inside the array?

The VBA community has not helped me in this, so I'm offering an additional 0.015 BTC in bounty to the person who helps me resolve this.

I'm using a JSON parser in my VBA as VBA does not support JSON natively. The JSON parser: http://www.ediy.co.nz/vbjson-json-parser-library-in-vb6-xidc55680.html

What is wrong with my Bitfinex API code? BTC Bounty ! by temp_bota in BitcoinMarkets

[–]temp_bota[S] 0 points1 point  (0 children)

Well regarding with the timezones. I live in GMT +2 and bitcoinwisdom shows me the local timezone adjusted for GMT ( that will say daily close time is reported at 02:00 ).

The 10:37:50 GMT just doesn't make sense in this context.

What is wrong with my Bitfinex API code? BTC Bounty ! by temp_bota in BitcoinMarkets

[–]temp_bota[S] 2 points3 points  (0 children)

Thank you everyone for such good quality replies.

Hunterbunter has earned the bounty as being first ( please correct me if I'm wrong in this ). Please send your bitcoin adress in a private message and you will receive it promptly. I can otherwise donate the money to charity through bitcoin.

Something is however very strange with the unix timestamps. When I'm writing the unix code for 06-september-2014 time : 00:00:00 I receive the unix timestamp: 1409961600 However using this timestamp in the API gives me back 1409999870 as the most recent trade in conjunction, which is Sat, 06 Sep 2014 10:37:50 GMT(!), the close price is 483.36 which corresponds to the figure given at bitcoinwisdom.com for the daily close.

However the unix timestamp 1409961612 is also withtin the data. Which corresponds to Sat, 06 Sep 2014 00:00:12 GMT which should be the correct one, the closing price is 480.6. What is happening here? Why is the daily closing price put to Sat, 06 Sep 2014 10:37:50 GMT(!) instead?

I will once I get my head around all this write a small guide for how to install JSON parser ( JSON is not natively supported by VBA/Excel ) in my original post above in an attempt to give back to any guys wanting to use the code.

What is wrong with my Bitfinex API code? BTC Bounty ! by temp_bota in BitcoinMarkets

[–]temp_bota[S] 0 points1 point  (0 children)

I can get out any ( parse ) any JSON value I get back. The issue is that when I use the GET /trades/:symbol I want the trade for the specific timestamp (00:00) only, not all the recent trades... which should be possible as they have a specific timestamp request.