Ask us anything. We're here to help.

2020-07-07

API Updates

New: Zero Hash Websocket Feed V1

Introducing the Zero Hash Websocket Feed, a client-friendly API that will allow customers to subscribe to account balance update information.

Reminder

Within Zero Hash, "accounts" are unique per asset, account type, and account group. For example, this is a unique account:

How it Works

1. Client successfully authenticates to the feed similarly to how you would for our Web API (private/public API key, signature, timestamp).

2. Zero Hash sends the initial-balance payload. This will contain the most recent balances for each of your and your customer's accounts.

3. Ping-Pong: A connection will be automatically severed if no information is received from the server for an extended period of time. To avoid this, ensure that you ping the Zero Hash server on an interval of 10 seconds or less, to which you will receive a corresponding pong message response back as an ack.

4. In the event that you or any of your customers balances change, you will receive a balance-updated message in real-time. You will only receive one payload per account that was updated. 

Payloads + Example Values

Initial Balance

{
"messageType":"initial-balance",
"body":{
"account_id": "12345",
"account_subtype": "12345",
"account_type": "available",
"balance": "1.0",
"asset": "BTC",
"account_owner": "00AABB",
"updated": "2020-05-28T13:14:15.929Z",
}
}

Balance Updates

{
"messageType":"balance-updated",
"body": {
"account_id": "12345",
"account_group": "12345",
"account_type": "available",
"new_balance": "1.0",
"change": "1.0",
"asset": "BTC",
"participant_code": "00AABB",
"participant_name": "Test Participant",
"run_timestamp": "2020-05-28T13:14:15.929Z",
"run_type": "deposit",
"run_id": "12345",
}
}

Versions

V1

Version 1 will stream balance-updated messages at the "run" or "batch" level. For example, the run_type "settlement" could occur as a result of numerous trades, say 10. The run will result in a single balance update; the net settlement from those 10 trades.  

V2

Version 2's balance-updated messages will contain "movement" level updates, Zero Hash's most granular level of asset movements. The data will be contained within a sub-array attached to the existing run level arrays. Using the example from V1, there will be 10 sub-arrays with a movement_type of final_settlement.

Get Connected

If you are interested in using the Zero Hash Websocket, please refer to our API Docs here to get started. If you have questions, please don't hesitate to email support@seedcx.com or ping us in a shared Slack or Telegram channel.

Deprecated: Exchange-Related HTTP Endpoints

The following public and private endpoints are deprecated:

  • /instruments
  • /fills
  • /orders
  • /positions

All of these were utilized by the Seed CX exchange, which is no longer operational.

Portal Updates

Portal Rebrand: Zero Hash

As you may have noticed, we have updated the portal to reflect the Zero Hash brand. This was done in an effort to eliminate any confusion; The Portal is the home for all-things-settlements.

Dashboard: New Net Delivery Obligation (NDO) Widget

We are continuing to build out our centralized dashboard. The next feature is an NDO panel that shows you all current NDO's across your connected platforms. Example:

mceclip0.png

Simply click on the "Explore my balances in detail" hyperlink to view all balances. 

Platform Positions

The new page, Platform Positions, allows platform operators to view all open positions of their customers. Here is the layout:

mceclip1.png

Top Section

  • New Trades (accepted): All trades that have been received by Zero Hash, but settlement has not been attempted.
  • Outstanding Trades (active): All trades that Zero Hash has attempted to settle, but was unable to full settle, due to 1 of the 2 counterparties being underfunded.
  • Terminated Trades: All trades that have successfully settled.
  • All Trades Received: A sum of the previous 3 sections.

Lower Section

  • Net Account Balance (NAB): NAB is the sum of all account types for the participant in a particular asset, i.e. Available + Collateral + Receivables - Payables - Collateral Payables.
  • Net Open Position (NOP): NOP is the net amount that is owed per asset based on all newly received trades, for which there has been no settlement run. These trades have a trade_state of accepted.
  • Expected Net Delivery Obligation (ENDO): ENDO is the expected delivery obligation that will occur in the future, once NOP is processed for settlement. ENDO is calculated as the max of 0 and (-NOP - NAB).
  • Net Delivery Obligation (NDO): NDO is the net amount due to settle all outstanding trades that have already been processed for settlement. NDO is calculated as the max of 0 and (Payables + Collateral Payables - Available - Collateral - Receivables).

The summary table contains one row per customer and asset for which there is an NOP.