Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: polorobot on July 20, 2018, 01:46:46 PM

Title: How to get LIVE Bitcoin and other Crypto currency as a Float value???
Post by: polorobot on July 20, 2018, 01:46:46 PM
Hi.
I need help. I want to make a nice 3D screensaver with live price of bitcoin.
I dont know hot to get latest BTC price value as a Float or String variable with playmaker. It shoult be Live (refresh every 1 min)
Can anyone help?


Title: Re: How to get LIVE Bitcoin and other Crypto currency as a Float value???
Post by: jeanfabre on July 30, 2018, 06:05:43 AM
Hi,

 where is your source? I supposed online, and I suppose with a REST api system, but you need to know exactly what system so that you can use something like DataMaker ( and the json support inside, as rest api usually send back data using json).

 Do you know DataMaker? Are you seasoned with PlayMaker already?

 Bye,

 Jean
Title: Re: How to get LIVE Bitcoin and other Crypto currency as a Float value???
Post by: polorobot on October 20, 2018, 10:18:39 PM
Hi
sorry for late reply and thank you for help. I am familiar with playmaker and I have downloaded the datamaker as you suggested. I have also found a way how to get price data online. Im using WWW object to download crypto price and it looks like this.
https://api.coinmarketcap.com/v1/ticker/bitcoin/

[
    {
        "id": "bitcoin",
        "name": "Bitcoin",
        "symbol": "BTC",
        "rank": "1",
        "price_usd": "6508.55910592",
        "price_btc": "1.0",
        "24h_volume_usd": "3332581644.17",
        "market_cap_usd": "112812854983",
        "available_supply": "17333000.0",
        "total_supply": "17333000.0",
        "max_supply": "21000000.0",
        "percent_change_1h": "0.44",
        "percent_change_24h": "0.72",
        "percent_change_7d": "3.27",
        "last_updated": "1540087351"
    }
]

Can you please tell me how to setup xPath to be able to extract all those values as a float?
Title: Re: How to get LIVE Bitcoin and other Crypto currency as a Float value???
Post by: djaydino on October 21, 2018, 07:20:29 AM
Hi.
Maybe this tutorial can help :

Title: Re: How to get LIVE Bitcoin and other Crypto currency as a Float value???
Post by: jeanfabre on October 29, 2018, 04:56:19 AM
Hi,

 this is a json, not an xml, so you will need to get to your data manually, by navigating node by node inside your json.

 We've found with djaydino a new version of a xml json library that exposes a lot of new features, and I'll be starting implementing them very soon, including a jpath variant :) and json to xml conversion.

Bye,

 Jean
Title: Re: How to get LIVE Bitcoin and other Crypto currency as a Float value???
Post by: alexandriaj on June 18, 2021, 03:09:08 AM
What currency, other than bitcoin, can I buy or mine?
Title: Re: How to get LIVE Bitcoin and other Crypto currency as a Float value???
Post by: RAVEN001 on June 18, 2021, 08:47:58 AM
{ Moderator snipped }

Be nice to people.
Title: Re: How to get LIVE Bitcoin and other Crypto currency as a Float value???
Post by: RAVEN001 on June 18, 2021, 08:58:48 AM
{ Moderator snipped }

Be nice to people.
Title: Re: How to get LIVE Bitcoin and other Crypto currency as a Float value???
Post by: RAVEN001 on June 18, 2021, 09:09:02 AM
{ Moderator snipped }

Be nice to people.