What one coldkey paid for the shares of a fund it still holds
Ce contenu n’est pas encore disponible dans votre langue.
One coldkey’s purchases of this fund since its last claim of it: a claim redeems bought shares and dividends whole, so only later purchases are still held. Dividends cost nothing and are not counted.
Rate limit: 300 requests per minute per IP (scope explore).
Authorizations
Section intitulée « Authorizations »- None
Parameters
Section intitulée « Parameters »Path Parameters
Section intitulée « Path Parameters »Validator hotkey SS58 address.
Query Parameters
Section intitulée « Query Parameters »The buyer. 400 when missing.
Responses
Section intitulée « Responses »The coldkey’s purchases still held, with what it paid.
/v1/beta-baskets/{hotkey}/cost-basis/?coldkey=: the coldkey’s purchases of the fund since its last claim of it,
the shares it still holds by purchase. A claim redeems bought shares and root dividends whole; dividends cost nothing.
object
TAO paid for those purchases. 0 when none since the last claim.
What they added to the fund’s realizable NAV: paid_tao - value_tao is their entry cost.
Fund shares they received, in the units of the fund’s shares.
The purchases counted: those since the coldkey’s last claim of this fund.
Of the purchases counted; null when there is none.
The coldkey’s last claim of this fund after its first purchase; null when there is none.
The newest indexed block the answer covers: a purchase or claim in a later block is not in it yet.
Example generated
{ "hotkey": "example", "coldkey": "example", "paid_tao": 1, "value_tao": 1, "shares": 1, "purchases": 1, "first_purchase_block": 1, "last_claim_block": 1, "as_of_block": 1}A parameter failed its check, which message names. code is usually VALIDATION_ERROR.
The error envelope every 4xx and 5xx response carries. The introduction lists the code values.
object
Always true. Lets a client branch without reading the status code.
Machine-readable error code, such as VALIDATION_ERROR or RESOURCE_NOT_FOUND. Branch on it, not on message.
One human-readable sentence.
Extra context for some codes, such as the invalid fields of a VALIDATION_ERROR or retry_after on RATE_LIMITED; else null.
Examples
VALIDATION_ERROR
{ "error": true, "code": "VALIDATION_ERROR", "message": "coldkey is required", "detail": null}RESOURCE_NOT_FOUND. Carries Cache-Control: public, max-age=15, short because a new block or extrinsic is indexed up to a minute late.
The error envelope every 4xx and 5xx response carries. The introduction lists the code values.
object
Always true. Lets a client branch without reading the status code.
Machine-readable error code, such as VALIDATION_ERROR or RESOURCE_NOT_FOUND. Branch on it, not on message.
One human-readable sentence.
Extra context for some codes, such as the invalid fields of a VALIDATION_ERROR or retry_after on RATE_LIMITED; else null.
Examples
RESOURCE_NOT_FOUND
{ "error": true, "code": "RESOURCE_NOT_FOUND", "message": "Not found", "detail": null}Rate limit exceeded (300/minute, per IP). Retry-After carries the seconds to wait.
The error envelope every 4xx and 5xx response carries. The introduction lists the code values.
object
Always true. Lets a client branch without reading the status code.
Machine-readable error code, such as VALIDATION_ERROR or RESOURCE_NOT_FOUND. Branch on it, not on message.
One human-readable sentence.
Extra context for some codes, such as the invalid fields of a VALIDATION_ERROR or retry_after on RATE_LIMITED; else null.
Examples
RATE_LIMITED
{ "error": true, "code": "RATE_LIMITED", "message": "Request was throttled", "detail": { "retry_after": 12 }}Seconds before the next request is accepted.
QUERY_TIMEOUT: the query exceeded its budget. detail carries budget_ms, elapsed_ms, path and query.
The error envelope every 4xx and 5xx response carries. The introduction lists the code values.
object
Always true. Lets a client branch without reading the status code.
Machine-readable error code, such as VALIDATION_ERROR or RESOURCE_NOT_FOUND. Branch on it, not on message.
One human-readable sentence.
Extra context for some codes, such as the invalid fields of a VALIDATION_ERROR or retry_after on RATE_LIMITED; else null.
Examples
QUERY_TIMEOUT
{ "error": true, "code": "QUERY_TIMEOUT", "message": "query exceeded the 12000 ms budget; retry, or narrow the requested range", "detail": { "budget_ms": 12000, "elapsed_ms": 12004, "path": "/trades/summary/", "query": "coldkey=5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&resolution=day" }}