playMaker

Author Topic: How to get LIVE Bitcoin and other Crypto currency as a Float value???  (Read 2670 times)

polorobot

  • Playmaker Newbie
  • *
  • Posts: 2
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?



jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
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

polorobot

  • Playmaker Newbie
  • *
  • Posts: 2
Re: How to get LIVE Bitcoin and other Crypto currency as a Float value???
« Reply #2 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?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: How to get LIVE Bitcoin and other Crypto currency as a Float value???
« Reply #3 on: October 21, 2018, 07:20:29 AM »
Hi.
Maybe this tutorial can help :


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to get LIVE Bitcoin and other Crypto currency as a Float value???
« Reply #4 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

alexandriaj

  • Playmaker Newbie
  • *
  • Posts: 1
What currency, other than bitcoin, can I buy or mine?

RAVEN001

  • Junior Playmaker
  • **
  • Posts: 66
  • BANNED
{ Moderator snipped }

Be nice to people.
« Last Edit: July 01, 2021, 04:36:10 PM by Lane »
BANNED

RAVEN001

  • Junior Playmaker
  • **
  • Posts: 66
  • BANNED
{ Moderator snipped }

Be nice to people.
« Last Edit: July 01, 2021, 04:36:06 PM by Lane »
BANNED

RAVEN001

  • Junior Playmaker
  • **
  • Posts: 66
  • BANNED
{ Moderator snipped }

Be nice to people.
« Last Edit: July 01, 2021, 04:36:01 PM by Lane »
BANNED