Skip to content

Several bugs with balance-for-coins api

  • 1. balance-for-coins documented as "deprecated API", but I don't think it is deprecated, it's the only way we have to get historical balance data I think.
  • 2. When I do: curl -X 'GET' \ 'https://api.syncad.com/hafbe_bal/balance-for-coins/blocktrades?coin-type=21&from-block=1&to-block=3' \ -H 'accept: application/json' I get
Undocumented
Error: response status is 400

Response body
Download
{
  "code": "22023",
  "details": null,
  "hint": null,
  "message": "step size cannot equal zero"
}
  • 3. get_balance_for_coin_by_time times out.
  • 4. Docs for APIs where dates are accepted as inputs should show an example date somewhere.

Note: I've added an extra index on api.syncad.com that was missing that will probably speed up 2 above (if it didn't fail) and probably should have speeded up 3 as well (but that would depend on query details I haven't investigated). This is the extra index: CREATE INDEX CONCURRENTLY account_balance_history_account_source_op_block_idx ON hafbe_bal.account_balance_history (account,source_op_block);

Edited by Dan Notestein