List deposits
/ depositsReturn the environment's deposits as a list, {object, data, has_more, url}, newest first: ordered on time, the instant the deposit was credited, which is the order a person reads an inbound feed in.
The filters are named, one value each.
owner,tx_id,from_address,to_address,contract_address,is_token_transferandnetwork_idmatch exactly, andcreated[gte],created[gt],created[lte]andcreated[lt]boundtime; together they are ANDed, and each page lists under the filters its own request sends, so a later page sends them again besidestarting_afterorending_before. A transaction that credited two addresses is two deposits with onetx_id, sotx_idanswers both. Matching part of a value, or one value or another, is a search:GET /deposits/search. Any other query parameter answers400parameter_unknownnaming it, and a value outside its schema, a badlimitor astarting_afterorending_beforenaming no object of this list answers422parameter_invalidnaming it.Deposits originating from a gas station are never on this surface.
They are Stridge refuelling its own addresses rather than money arriving from outside, so they are on no page, whatever the filters.
Show 2 more detailsShow fewer details
The scope comes from the request, not from a filter.
The environment is resolved from the credential and the
X-Stridge-Environmentheader before any filter is read, and no filter can widen it: a deposit of another environment is on no page.A resetting sandbox.
While a sandbox's reset runs it answers
409environment_resetting: nothing is served for a sandbox until its reset finishes.
Parameters
Query
- limitinteger <int32>optionaldefault 20
The page size. A value that is not an integer from 1 to the maximum answers
422parameter_invalidnaminglimit; it is never clamped. - starting_afterstringoptional
A cursor: the id of an object of this list, usually the last one of the page just read. The page answered holds the objects that come right after it in the list's order. The object need not match this request's filters; its place in the order is what counts.
Show full descriptionShow less
An id that names no object of this list in this environment answers
422parameter_invalidnamingstarting_after. It cannot be sent withending_before. - ending_beforestringoptional
A cursor: the id of an object of this list, usually the first one of the page just read. The page answered holds the objects that come right before it, still in the list's order, and
has_moresays whether there are more before them.Show full descriptionShow less
An id that names no object of this list in this environment answers
422parameter_invalidnamingending_before, as does sending it together withstarting_after. - ownerstringoptional
Only deposits to addresses assigned to this owner, the caller's own identifier for a customer.
- tx_idstringoptional
Only deposits carried by this on-chain transaction hash, matched exactly.
- network_idinteger <int32>optional
Only deposits that landed on this chain, by the chain's own numeric identifier.
- from_addressstringoptional
Only deposits sent from this address, matched exactly as the chain spells it.
- to_addressstringoptional
Only deposits credited to this address, matched exactly as the chain spells it: the deposits one of the environment's addresses received.
- contract_addressstringoptional
Only token deposits of the contract at this address, matched exactly. Native-asset deposits are the ones
is_token_transfer=falselists. - is_token_transferbooleanoptional
truelists only token transfers,falseonly native-asset deposits. - created[gte]string <date-time>optional
Only objects created at or after this instant (RFC 3339).
- created[gt]string <date-time>optional
Only objects created after this instant (RFC 3339).
- created[lte]string <date-time>optional
Only objects created at or before this instant (RFC 3339).
- created[lt]string <date-time>optional
Only objects created before this instant (RFC 3339).
Headers
- X-Stridge-Environmentstring <uuid>optional
Which environment the request acts inside, on an operation a session and an API key both call. Learn more
Show full descriptionShow less
It is required under a person's session, exactly as
EnvironmentHeaderdescribes: a session request that omits it answers400withenvironment required, and one naming an environment the caller holds no membership of answers404.An API key names its own environment, so a request made with one omits this header. A key request that sends it answers
400withenvironment header not accepted, whatever it names, rather than having the header ignored: a header that is silently ignored hides the integration bug that sent it.
Responses
The page of deposits.
- objectstringrequiredenum list
The object's type, always
list. - idstring <uuid>required
The deposit's opaque identifier.
- objectstringrequired
The object's type, always
deposit. - environment_idstring <uuid>required
The environment this deposit is scoped to. It is carried on the object rather than implied by the request, so the scope a client rendered is the scope the server answered in.
- livemodebooleanrequired
truewhenenvironment_idnames aliveenvironment andfalsein a sandbox. It is carried on the object itself, so a payload read on its own, a logged response or a webhook body, still says which side of the boundary it came from. - ownerstring | nullrequired
Who the receiving address was assigned to, as the caller named them at assignment. It is the caller's own identifier for a customer rather than anything this API mints, so it is free text.
Show full descriptionShow less
nullon an address no caller named: one assigned to nobody, or the environment's vault or gas station. - tx_idstringrequired
The on-chain transaction hash that carried the deposit, or empty where the chain reported the credit without one.
- network_idinteger <int32>required
The chain the deposit landed on, as the chain's own numeric identifier. It is not a UUID and it addresses nothing in this API: a client resolves it against the network catalogue.
- network_symbolstringrequired
The chain's ticker, or empty where the network catalogue holds no symbol for it. A client renders the fallback rather than the empty string.
- symbolstringrequired
The asset's ticker, or empty where the token registry does not recognise the contract. An unrecognised asset is still a real deposit, which is why it is reported rather than dropped.
- assetstringrequired
The asset's name, or empty alongside an unrecognised
symbol. - contract_addressstringrequired
The asset's contract on that chain, or the chain's native-asset sentinel where the deposit was the chain's own coin.
- decimalsinteger <int32>required
How many decimal places the asset carries, which is what scales
balance.rawtobalance.amount.amount_decimal. - is_token_transferbooleanrequired
Whether the deposit moved a token rather than the chain's native coin.
- from_addressstringrequired
Where the money came from, or empty where the chain reported no sender (a coinbase or a consolidated input).
- from_wallet_categorystringrequiredenum external · vault · gas_station · uda
What kind of address sent it.
externalis an address this API version does not manage: one outside Stridge, or one of the environment's own addresses of a kind this version has no surface for. Every other value names a kind it does manage.Show full descriptionShow less
A deposit sent by a
gas_stationnever appears on this surface. - to_addressstringrequired
The address the deposit was credited to.
- to_wallet_categorystringrequiredenum vault · gas_station · uda
What kind of address received it. Always a kind this API version manages: a deposit is only observed on an address Stridge watches, and one received by an address of a kind this version has no surface for never appears on it.
- block_numberstringrequired
The block the transaction was included in, as a decimal string because block heights on some chains exceed what a double represents exactly. Empty where the chain reported no height.
- scanner_urlstringrequired
A block-explorer link for the transaction, or empty where no explorer is known for the chain. A client renders the link only when there is one.
- timestring <date-time>required
When the deposit was observed on chain. RFC3339 UTC,
Zsuffixed. The list is ordered on it, newest first, itscreatedfilters bound it, and the aggregate buckets on it. What the deposit was worth, three ways: the on-chain integer, the same figure scaled by the asset's decimals for display, and the USD Stridge valued it at when it landed.
- idstring <uuid>required
- has_morebooleanrequired
Whether the list holds more objects past this page in the direction it was read: after its last object, or before its first for a page read with
ending_before. - urlstringrequired
The path the list is read at.
Errors
The error.code values this operation can return. Each one links to its entry in the error catalogue, which explains the cause and the fix.
- 400environment_requiredEnvironment required
- 400header_invalidInvalid header
- 400422parameter_invalidInvalid parameter
- 400parameter_unknownUnknown parameter
- 401api_key_not_acceptedAPI key not accepted
- 401authentication_requiredAuthentication required
- 401publishable_key_not_acceptedPublishable key not accepted
- 401token_invalidInvalid or expired token
- 403membership_suspendedMembership suspended
- 403permission_deniedPermission denied
- 404environment_not_foundEnvironment not found
- 409environment_provisioningEnvironment provisioning
- 409environment_resettingEnvironment resetting
- 429rate_limitedToo many requests