API Updates

We have launched a duo of new Awards endpoints that are closely related and are designed to be used sequentially. The primary use case is to facilitate crypto awards payments as part of a promotional program, prize pool, bonus pool, giveaway, etc. This endpoint has built-in liquidity- the purchasing and then the distribution/settlement both take place within the Zero Hash ecosystem.

New Endpoints

POST /awards/fund

Purpose: This endpoint allows the client to specify the amount, quoted currency, and asset that will ultimately be distributed to their customers. The resulting purchase will reside in a float account instantly.
Other Notes:

  • Similar to Liquidity and Rewards endpoints, clients can specify a quantity (amount of BTC, for example) or a total (US Dollar amount of BTC).
  • This endpoint is functional for all assets supported by ZHLS, described here.

Payload example:

{
  "underlying": "BTC",
  "quoted_currency": "USD",
  "quantity": "1"
}

POST /awards/distribute

Purpose: After the initial fund, this endpoint is used to evenly distribute the purchased crypto among the participants that you specify in the payload. The exact amount will be specified by the client in this call as well.
Payload example: In this example, let's say you want to distribute the 1 BTC among 4 of your customers.

{
  "asset": "BTC",
  "quantity": ".25",
  "participant_codes": ["CUST01","CUST02", "CUST03", "CUST04"]
}

Other Considerations

API Key Permissions

There is a new API Key Permission for "Awards". You will need to enable this when you create new API keys in order to interact with the above endpoints:

Confirmation

To validate that the fund or distribute transactions have fully settled, you can take the trade_id's from the response and then poll GET /trades:trade_id endpoint. If trade_state = "terminated", then you can be confident that your customer has received the funds in their account. Response examples:

POST /awards/fund

{
"message": {
   "request_id": "9d355b88-b2e3-4272-8ec4-352e1c7618a1",
     "quote": {
        "request_id": "9d355b88-b2e3-4272-8ec4-352e1c7618a1",
        "participant_code": "CJC9I7",
        "quoted_currency": "USD",
        "side": "buy",
        "quantity": "1",
        "price": "50000.00",
        "quote_id": "902654fc-c43e-426e-85f8-d9484b1ae382",
        "expire_ts": 1633024897781,
        "account_group": "00SCXM",
        "account_label": "awards",
        "underlying": "BTC"
               },
        "trade_id": "e629906c-76c3-4aec-8b28-5a536e00ec23",
        "status": "Completed",
        "trade_ids_list": [
        "e629906c-76c3-4aec-8b28-5a536e00ec23"
                          ]
            }
}

POST /awards/distribute

{
"message": {
      "confirms_list": [
             {
                "participant_code": "NEPBSH",
                "trade_id": "9958af6e-1bcc-4325-b1b4-02206792692b"
             },
             {
                "participant_code": "O70IOW",
                "trade_id": "bf16b834-0c4c-41b2-b991-00da3d1bed2f"
             }
        ]
    }
}

Limits

It is quite possible that your platform's promotional campaign has a large number of entrants, say 100,000. The internet has its limits, and 100,000 participant_codes do not fit within a single POST /awards/distribute request. We recommend breaking these into chunks to ensure that all distributions can be made successfully.

There are 2 new filter options on the GET /withdrawals/requests endpoint:

  • status
  • requested_timestamp

Status

You can filter for the following statuses:

  • PENDING
  • SETTLED
  • REJECTED
  • APPROVED

Requested Timestamp

requested_timestamp filters withdrawal requests based on a given timestamp in milliseconds (1593798130060) or nanoseconds (1593798130060000000) using the following params for the following filter types:

  • [gt] greater than a given timestamp, e.g. requested_timestamp[gt]=1593798130060
  • [gte] greater than or equal to a given timestamp, e.g. requested_timestamp[gte]=1593798130060
  • [e] equal to a given timestamp, e.g. requested_timestamp[e]=1593798130060
  • [lt] less than a given timestamp e.g. requested_timestamp[lt]=1593798130060
  • [lte] lower than or equal to a given timestamp, e.g. requested_timestamp[lte]=1593798130060

Combinations are also possible, e.g. to find withdrawal requests between 1593798130555 and 1593798130777 you can use the next combination requested_timestamp[gt]=1593798130555&requested_timestamp[lt]=1593798130777.

Full API specs found here.

On 2021-08-25, we deployed 11 new assets. These assets are the latest additions to our platform. They are fully available and do not require any additional adjustments to begin the settlement, trading, or withdrawal.

NameSymbol
Kyber NetworkKNC
CivicCVC
CompoundCOMP
MakerMKR
StorjSTORJ
OrchidOXT
DogecoinDOGE
Wrapped BTCWBTC
UniswapUNI
The SandboxSAND
The GraphGRT

We are changing the name of the existing field zerohash_bank_name to source in the GET /deposits response in order to make this field more generic.

The updated official description of the field is "The bank into which the fiat deposit was made or the blockchain address from which the crypto deposit came".

API specs are here.

The Ethereum London Hardfork upgrade is due to be scheduled on block #12965000 which is expected on or around ~7:30 AM CT, August 5th, 2021. Deposits and withdrawals will be suspended 30 minutes prior to the expected time of the hardfork. Any deposits made to a Zero Hash address will not be credited during this period. Additionally, any submitted withdrawals will be accepted by the system but will not process until systems are operational. We will monitor the situation and resume operations when the hardfork is complete and the network is stable. Please refer to our status page for the latest updates here: https://status.zerohash.com/

  • Leveraging Zero Hash Liquidity Services (ZHLS), fin-tech platforms can now easily add crypto rewards products via the new endpoint POST /rewards.
  • The endpoint is light-weight and requires the platform to only 1) Pre-fund and 2) Call the endpoint.

Dedicated 1-pager with more details can be found here .

  • We are looking to remove the risk_score fields from the GET /withdrawals/requests
    and the GET /withdrawals/requests/:id endpoint on Monday, July 26th 2021.

For platforms that leverage Zero Hash Liquidity Services, you can now view your revenue account information via the following endpoints:

  • GET /accounts
  • GET /accounts/:account_id
  • GET /accounts/:account_id/run_history
  • GET /accounts/:account_id/movements

View standalone 1-pager here for more details.

Beginning Monday, April 19th, 2021 Zero Hash will add support for the following assets:

  • Polkadot (DOT)
  • Enjin Coin (ENJ)
  • GMO GYEN (GYEN)
  • GMO ZUSD (ZUSD)
  • Pax Gold (PAXG)

All products will be fully supported via the Zero Hash suite of API's as well as our client portal. For more information on products supported by Zero Hash please see our full list here.

The Ethereum Berlin Hardfork upgrade is due to be scheduled on block #12,244,000 which is expected for April 14th, 2021. Due to the fork being non-contentious we do not expect to see any interruptions in services. All nodes have been patched to the latest version and support the upcoming upgrade.