Advanced: fees

Search calculation chains

Finds calculation chains to reuse by binding or forking them.

GET /calculation-chains/search

Finds calculation chains to reuse by binding or forking them.

  • Lists every chain you can see that is not deprecated: your own, official ones and those other users share. owner (mine, official or public) and search (a case-insensitive substring of the name) narrow it.
  • website and purpose keep only chains some binding uses on that marketplace or for that purpose.
  • Ordered by ref_count, most used first, unless sort says otherwise; with page (and page_size, at most 100) one page with the total.
  • Each entry carries a readable formula: a nominal amount of 100 flowing through the chain, or, for a chain that fixes no currency, its steps applied to a symbolic input x (for example x × 0.975); fetch the full chain with GET /calculation-chains/{calculation_chain_id}.

Usage

NameDescription
AuthenticationAPI key required
Credit costFree

Parameters

NameInTypeRequiredDescription
websitequerystring or nullNoOnly return chains bound to this marketplace, by marketplace code.
purposequerystring or nullNoOnly return chains bound for this purpose: deposit, sale or withdraw.
ownerquerystring or nullNoWhich records to list. Omit for everything you can see. official: the platform's official records. public: records users share. mine: your own. Values: official, public, mine.
searchquerystring or nullNoCase-insensitive substring to match against the name.
sortquerystringNoSort order: ref_count (default; most used first), name (official chains first) or updated_at (most recently changed first). Values: ref_count, name, updated_at. Default: ref_count.
pagequeryinteger or nullNoPage number, from 1. When given, the response is a page (items, total, page, page_size) instead of the full list.
page_sizequeryintegerNoRecords per page (1 to 100); used with page. Default: 20.

Responses

StatusDescriptionSchema
200Successful ResponseEnvelope_Union_list_CalculationChainSearchOut___PageOut_CalculationChainSearchOut___
401Authentication is missing or invalidErrorEnvelope
403The credential is valid but not allowed to call this operationErrorEnvelope
422A parameter or the request body is invalidErrorEnvelope
429Too many requests to this endpoint; retry laterErrorEnvelope
503The service is temporarily unavailable; retry laterErrorEnvelope

Models

CalculationChainSearchOut

A calculation chain found through search.

FieldTypeRequiredDescription
calculation_chain_idintegerYesID of the calculation chain.
namestring or nullYesDisplay name, if set.
revisioninteger or nullYesCurrent revision of the chain.
owner_user_idstring or nullYesID of the owning user; null for a platform chain.
is_officialbooleanYesWhether the chain is official.
is_searchablebooleanYesWhether the owner shares the chain.
ref_countintegerYesHow many times the chain is bound or has been forked; results are sorted by it unless sort says otherwise.
step_countintegerYesNumber of steps in the chain.
formulastring or nullYesReadable arithmetic for the chain. With a start_currency, a nominal amount of 100 in it flows through the steps, each followed by its result, for example 100.00000000 USD → × 0.975 = 97.50000000 USD. Without one (no step fixes a currency, or there are no steps), the steps are applied in order to a symbolic input x, with parentheses where the order needs them, for example x × 0.975 or x × 0.98 ÷ 1.05; a chain with no steps is just x. null only when no formula can be built, for example when a chain without a start currency contains a group with no members.

CreditMeta

Credit accounting for a billable request.

FieldTypeRequiredDescription
costintegerYesCredits this request costs.
remainingintegerYesEstimated credit balance left after this request. A hint rather than a ledger: concurrent requests can make it slightly off.

Envelope_Union_list_CalculationChainSearchOut___PageOut_CalculationChainSearchOut___

FieldTypeRequiredDescription
dataarray of CalculationChainSearchOut or PageOut_CalculationChainSearchOut_YesThe endpoint payload.
metaMetaYesRequest metadata.

ErrorBody

Details of a failed request.

FieldTypeRequiredDescription
codestringYesStable machine-readable error code. Branch on this value, not on message.
messagestringYesHuman-readable explanation. The wording may change.
detailsobject or nullNoOptional structured context, such as the list of validation errors or, for credit_insufficient, the required and remaining credits.

ErrorEnvelope

Error response: the error in error plus request metadata in meta.

FieldTypeRequiredDescription
errorErrorBodyYesWhat went wrong.
metaMetaYesRequest metadata.

Meta

Request metadata included in every enveloped response.

FieldTypeRequiredDescription
request_idstringYesUnique identifier of this request, identical to the X-Request-ID response header. Quote it when contacting support.
billableboolean or nullNoWhether the request is billed in credits. Present only on metered endpoints; false means the request is free, for example because it costs nothing or your subscription covers it.
creditCreditMeta or nullNoCost of the request and your estimated remaining balance. Present only when billable is true.
pagePageMeta or nullNoPaging state. Present only on a response that lists a page.

PageMeta

Where a paged list stands after this page.

FieldTypeRequiredDescription
limitintegerYesPage size actually applied to this request.
has_nextbooleanYesWhether another page follows.
next_cursorstring or nullYesPass it back unchanged as cursor to get the next page; null once the list is complete.

PageOut_CalculationChainSearchOut_

FieldTypeRequiredDescription
itemsarray of CalculationChainSearchOutYesThe records on this page.
totalintegerYesNumber of matching records on all pages.
pageintegerYesThis page's number, from 1.
page_sizeintegerYesRecords per page.

Download the public OpenAPI schema