Trade Execution Rejection for Amounts Less Than a Penny
Summary
Trade executions that result in an amount less than a penny (.01) as calculated by trade_price * trade_quantity will be rejected.
Impacted Endpoints
GET /liquidity/rfq
POST /rewards
POST /awards/fund
POST /awards/distribute
POST /trades
POST /trades/batch
Error Messages
If a request results in a quote for less than a penny: "rfq notional must be greater than 0"
If a trade is submitted for settlement for an amount less than a penny: "BadRequest: The submitted notional is less than the minimum precision supported by the quoted currency (0.01 USD)"
Enabling Destination-Tag Specification for Convert-Withdraw Product
Release Date
March 27, 2023
Release Type
Informational – Optional action from platforms.
Summary
Platforms can now specify a destination-tag when using the Convert-Withdraw product with tag-based assets (XRP, XLM, HBAR, etc.). This new optional feature provides more flexibility for platforms.
Action Required
Platforms interested in using the new feature should work with Zero Hash support if they are not already utilizing the Convert-Withdraw product.
Platforms already enabled with Convert-Withdraw should ensure they are enabled for any tag-based assets they wish to support, if not already configured.
Endpoints Impacted
GET /convert_withdraw/rfq: Platforms should refer to the API docs to see how to build a request using a destination-tag.
This will not affect the POST /convert_withdraw/execute request.
Zero Hash is pleased to announce that we have increased support for additional query parameters when using our GET /transfers endpoint. Prior to this launch, Platforms could only query applying a filter for the client_transfer_id.
Action Required
This is a feature that Platforms can opt to use if they are already using transfers to query transfer history. No additional configuration is required.
Endpoints Impacted
GET /transfers will now support the following query parameters:
page: Optional. This is to allow the Platform to paginate through response payloads.
page_size: Optional. Shall dictate the size of the list in the response payloads.
to_participant_code: Optional. Filter for transfers that have the participant_code matching what is provided in the query param.
from_participant_code: Optional. Filter for transfers that have the participant_code matching what is provided in the query param.
requested_timestamp: Optional. Correspond to the created_at date. Requested_timestamp filters movements based on a given timestamp in milliseconds 1593798130060 or nanoseconds 1593798130060000000 using the following next 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 movements between 1593798130555 and 1593798130777 you can use the next combination requested_timestamp[gt]=1593798130555&requested_timestamp[lt]=1593798130777
Informational – No action or changes necessary from platforms.
Summary
Zero Hash has now added an account label query parameter to the following endpoints:
GET /trades
GET /positions
GET /withdrawals/requests
GET /deposits
Prior to this release, platforms were not able to designate a specific account label for these responses and thus received back a larger data set than was needed.
Account Labels can be thought of as "sub account groups". Within each account group, you can have many account labels. They are used to separate funds at a more granular level. One individual can have two separated BTC accounts, for example.
Platforms are now able to add the account label filter to all of these responses in order to query by account label as well as participant code.
Action Required
Informational – No action or changes necessary from platforms.
Endpoints Impacted
The following endpoints are impacted due to this feature improvement, the change being available in both Cert and Production environments:
Informational – Please see the “Action Required” section for instructions on enabling this feature.
Summary
Zero Hash has now added the ability for platforms to provide an account label when using the following endpoint:
POST /deposits/digital_asset_addresses
Prior to this release, platforms were not able to designate a specific account label for a digital asset deposit, and thus could not create different on-chain digital asset addresses for a customer that had multiple accounts on their platform.
Account Labels can be thought of as "sub account groups". Within each account group, you can have many account labels. They are used to separate funds at a more granular level. One individual can have two separated BTC accounts, for example.
Platforms are now able to designate a specific account label when creating multiple digital asset addresses. This functionality is available on a per participant and per asset basis. If Zero Hash receives a new account label within the deposit request, a new on-chain address will be created. Please note that each on-chain address creation event will incur network fees.
Account labels must conform to the following criteria:
Account labels are case sensitive and can be a maximum of 40 characters
Only numbers, letters, hyphens, and underscores are allowed.
Sending the same account label with different cases will result in multiple accounts being created.
Action Required
If you would like to enable this feature, please reach out to [email protected]. This will allow our team to properly configure platform settings to create multiple on-chain addresses per participant code per asset.
Endpoints Impacted
The following endpoint is impacted due to this feature improvement, the change being available in both Cert and Production environments:
Actionable – Updates required for platforms that have enabled withdrawals and want to use the new feature.
Summary
Zero Hash now supports additional configurations related to handling network fees for withdrawals. The new model allows platforms to generate a network fee quote and execute it upon approval from the end user. Network fees are quoted and debited based on the requested withdrawal asset, making it easier for end users to understand charges. Network fees are also netted from the requested withdrawal amount, ensuring that end users do not owe more than they request to withdraw.
How It Works
Platforms need to be configured by Zero Hash for the service.
Platforms generate a withdrawal quote using GET /withdrawals/locked_network_fee, which returns details about the withdrawal and a withdrawal_quote_id.
Withdrawal_quote_ids are valid for 30 seconds.
After the Participant accepts the quote, the Platform executes the quote by passing the withdrawal_quote_id using POST /withdrawals/execute.
Zero Hash performs ledgering actions, including generating a pending withdrawal and creating a confirmed withdrawal message.
Action Required
Platforms interested in using the feature need to reach out to Zero Hash Customer Service team or Platform Solutions team for additional configurations. This will impact how Platforms execute withdrawals and will require using the aforementioned endpoints to facilitate all withdrawals.
Endpoints Impacted
NEW - GET /withdrawals/locked_network_fee
Accepted Parameters:
"participant_code" (Required)
"account_group" (Optional)
“account_label" (Optional)
"amount" (Required)
"max_amount" (Optional)
"asset" (Required)
"withdrawal_account_id" (Required if withdrawal_address is not provided)
"withdrawal_address" (Required if withdrawal_account_id is not provided)
"destination_tag" (Required for tag-based assets)
Example Request
GET /withdrawals/locked_network_fee?participant_code=CUST01&account_group=PLAT01&account_label=general&amount=0.02&asset=BTC&withdrawal_address=mohjSavDdQYHRYXcS3uS6ttaHP8amyvX78
Once Cert testing has been completed, platforms may be approved for Prod use
Release Type
Actionable, non-breaking – Updates required for platforms, but it will not break current functionality
Summary
Zero Hash has added an endpoint (PATCH /participants/customers/{participant_code}) that permits platforms to update certain participant data. This enables address updates to participants, which allows for easier reporting (including tax reporting) and improved end user experience when transacting on the Zero Hash platform.
Important note: This endpoint does not support updating entities, which will come at a later date on a distinct endpoint. Updating authorized minors occurs on a different endpoint that is not public.
Updatable Information
Fixed pieces of participant information are updatable via this new endpoint:
Name
Address
Email
ID
Zero Hash requires that platforms perform due diligence when a participant updates fundamental pieces of their identity, so a <platform_updated_at> timestamp has been introduced to capture when the platform validated and approved the participant submitted update.
Requirements:
All update requests must include the following. Requests that don’t include the following will fail.
participant_code – The unique identifier of the participant being updated
platform_updated_at – A UNIX (ms) timestamp of when the platform verified/accepted the participant requested update
Endpoints Impacted
The addition of this endpoint does not impact the functionality of any other existing endpoints; however, it is inherently tied to POST /participants/customers/new.
New Endpoint:
PATCH /participants/customers/{participant_code}
Seeing as the endpoint request involves a <participant_code>, multiple participants cannot be updated in one call.
Action Required
Platforms are required to backfill data that was previously updated by participants. Platforms should also begin to pass participant updates through as those updates are verified/approved to ensure no disruption in participant access to transactions, and to enable accurate state reporting for Zero Hash. This includes all address updates, not just updates in and out of heavily regulated jurisdictions.
Success and Failure Messages
A platform can send one update at a time (e.g. just address), or multiple (e.g. name and address); however, if segment requirements are not met, the whole update will be declined.
Breakdown:
Scenario
Response
Successfully updated data
200 + payload of the updated participant record
Submits data that is not updatable
400: Cannot update the requested fields: {fields listed}
Segment requirements were not met
400: Data segment validation failed. One or more segment fields either invalid or not provided. Segment error: “{required field} required field”, “{field_name} should match format {required format}”
Participant is not allowed to be updated via this endpoint
400 - Participant {participant_code} is not a customer
Platform is not approved to submit participant updates
403 - Participant {platform_code} is not allowed to submit/update customers
Relationship does not exist between the platform and participant
403 - Participant {participant_code} is not a customer of {platform_code}
Only platform_updated_at is submitted
400 - platform_updated_at submitted with no data segment to update
Restricted Jurisdiction Residents
When updating participant data, platforms may find that a participant is moving from a less restricted jurisdiction to a more heavily restricted jurisdiction, or vice versa. The most prominent example right now is a participant moving to or from New York (NY). Specifically, New York residents can only trade a subset of Zero Hash supported assets.
Participant moves to NY who holds a NY restricted asset:
These participants will be allowed to hold, sell, or withdraw the NY restricted asset at any time. They will not be able to buy, deposit, transfer, or **gain rewards in the NY restricted asset.
Participant moves out of NY:
Once the address update is successful, the participant will be able to make requests for assets that were not available in NY, barring the assets are allowed in the new participant jurisdiction. Platforms are encouraged to get proof of new address across the board, and especially for those leaving NY
Relevant Documentation
Please reference the Participants section of the API documentation.
Informational – No action or changes necessary from platforms.
Summary
Zero Hash has now added the ability for platforms to provide an account label when using the following endpoints:
POST /liquidity/RFQ
POST /rewards
POST /withdrawals/requests
Prior to this release, platforms were able to create and pass account labels to ZH using only the POST /trades and POST /transfers endpoints, as well as look up account labels using GET /accounts.
Account Labels can be thought of as "sub account groups". Within each account group, you can have many account labels. They are used to separate funds at a more granular level. One individual can have 2 separated BTC available accounts, for example.
Most platforms use a UID such as an account number as the customer's unique account label. Account labels can be automatically created as they get used for both the POST /liquidity/RFQ,POST /rewards and POST /trade endpoints.
Please note, the POST /withdrawals/requests endpoint does NOT automatically create a new endpoint since a withdrawal would need to have had an account label created previously.
Previously, there was no way to designate a particular account when leveraging the specified endpoints, which limited the ability of platforms to offer separated accounts for end users. Platforms were only able to pass an account label using the POST /trades and POST /transfers endpoints.
Now, however, platforms are able to pass the account label value within these endpoints. They are also able to create the new account label automatically when using POST /rewards and POST /liquidity/rfq endpoints.
Limitations: Account labels are case sensitive with a 40 character limit, and will create two separate account labels if the same characters are sent at separate times using both upper and lower case. Only numbers, letters, and underscores are allowed.
Action Required
There is no action needed by platforms, as this is not a breaking change. If no unique account label is passed within the endpoint, the account label will default to the standard "general" label.
Endpoints Impacted
The following endpoints are impacted due to this feature improvement, the change being available in both Cert and Production environments:
POST /liquidity/RFQ
POST /rewards
POST /withdrawals/requests
Example Response of POST /liquidity/execute with 'test1' as account_label: