LOADING
分享

Public API


Notifications for API Usage

1. CSPA Index API

Access

Parameters

Returns

Returned Object

Key
Type
Description
success
Bool
Success or failure indication.
message
Text
The error message when any problem occurred.
elapsed
Number
The time elpased for querying the API call.
data
Object
The query result as an array object with key value formatted like 'CSPA::primary_code/:secondary_code'.

data Object

Key
Type
Description
cspa
Number
Coinhills Spot Price Average index value.
cspa_change_24h
Number
Last 24 hours change.
cspa_change_24h_pct
Number
Last 24 hours change. Percentage unit.
volume_:primary_code_24h
Number
Last 24 hours total volume. :primary_code countervalue.
volume_:secondary_code_24h
Number
Last 24 hours total volume. :secondary_code countervalue. If :secondary_code parameter not provided, USD countervalue provided by default.
updated
Number
Last updated time by Unix Timestamp.

Example

$ curl https://api.coinhills.com/v1/cspa/btc/

{
    "success": true,
    "message": null,
    "elapsed": 0.0859,
    "data": {
        "CSPA:BTC": {
            "cspa": 368.14050821,
            "cspa_change_24h": 9.07165325,
            "cspa_change_24h_pct": 2.53,
            "volume_btc_24h": 2644087.61,
            "volume_usd_24h": 973395756.75,
            "updated": 1448832180
        }
    }
}

2. Status API

Access

Parameter

Returns

Returned Object

Key
Type
Description
success
Bool
Success or failure indication.
message
Text
The error message when any problem occurred.
elapsed
Number
The time elpased for querying the API call.
data
Object
The query result array object with 'status code' keys.

data Object

Key
Type
Description
key
Text
Status code.
value
Number
The value of the status code.
value_change
Number
The change of the value against the 24 hours before.
updated
Number
Last updated time by Unix Timestamp.

Status Code

status code
Description
currencies
Number of digital currencies registered in Coinhills.
currencies_available
Number of available digital currencies registered in Coinhills.
exchanges
Number of digital currency exchanges registered in Coinhills.
exchanges_available
Number of available digital currency exchanges registered in Coinhills.
markets
Number of digital currency markets registered in Coinhills.
markets_available
Number of available digital currency markets registered in Coinhills.
volume_btc_total_24h
Last 24 hours total traded volume from the digital currency exchanges registered in Coinhills. BTC countervalue.
volume_usd_total_24h
Last 24 hours total traded volume from the digital currency exchanges registered in Coinhills. USD countervalue.

Example

$ curl https://api.coinhills.com/v1/status/

{
    "success": true,
    "message": null,
    "elapsed": 0.0849,
    "data": {
        "currencies": {
            "value": 988,
            "value_change": 0,
            "updated": 1448832180
        },
        "currencies_available": {
            "value": 420,
            "value_change": 0,
            "updated": 1448832180
        },
        "exchanges": {
            "value": 97,
            "value_change": 0,
            "updated": 1448832180
        },
        "exchanges_available": {
            "value": 83,
            "value_change": 0,
            "updated": 1448832180
        },
        "markets": {
            "value": 3761,
            "value_change": -5,
            "updated": 1448832180
        },
        "markets_available": {
            "value": 1259,
            "value_change": -6,
            "updated": 1448832180
        },
        "volume_btc_total_24h": {
            "value": 2882980.3073822,
            "value_change": 563521.99004899,
            "updated": 1448832180
        },
        "volume_usd_total_24h": {
            "value": 1061341958.0169,
            "value_change": 228871331.89902,
            "updated": 1448832180
        }
    }
}