> For the complete documentation index, see [llms.txt](https://docs.tradecraft.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tradecraft.fi/api/routes/tokens.md).

# Tokens

Token and instrument information.

## Get Token A information

> Returns token information for the first token in the liquidity pool. Note that this is not always the first token in the pool name.

```json
{"openapi":"3.0.3","info":{"title":"Tradecraft AMM HTTP API","version":"1.28.0"},"tags":[{"name":"Tokens","description":"Token and instrument information."}],"servers":[{"url":"https://api.tradecraft.fi/v1","description":"Mainnet"},{"url":"https://tradecraft.validator.test.canton.obsidian.systems/amm-http-api","description":"Testnet"},{"url":"https://tradecraft.validator.dev.canton.obsidian.systems/amm-http-api","description":"Devnet"}],"paths":{"/tokenA/{tokenA}/{tokenB}":{"get":{"summary":"Get Token A information","description":"Returns token information for the first token in the liquidity pool. Note that this is not always the first token in the pool name.","operationId":"getTokenA","tags":["Tokens"],"parameters":[{"$ref":"#/components/parameters/tokenA"},{"$ref":"#/components/parameters/tokenB"}],"responses":{"200":{"description":"Token A information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"AMM not found or token unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"parameters":{"tokenA":{"name":"tokenA","in":"path","required":true,"description":"The name/symbol of the first token (URL encoded).","schema":{"type":"string","enum":["CC","USDCx","CBTC","cETH","HANDL","EDELx","SBC"]}},"tokenB":{"name":"tokenB","in":"path","required":true,"description":"The name/symbol of the second token (URL encoded).","schema":{"type":"string","enum":["CC","USDCx","CBTC","cETH","HANDL","EDELx","SBC"]}}},"schemas":{"TokenResponse":{"type":"object","description":"Token information response.","required":["instrument_id","instrument_info"],"properties":{"instrument_id":{"$ref":"#/components/schemas/InstrumentId"},"instrument_info":{"$ref":"#/components/schemas/InstrumentInfo"}}},"InstrumentId":{"type":"object","description":"Unique identifier for a financial instrument.","required":["admin","id"],"properties":{"admin":{"type":"string","description":"The party administering the instrument"},"id":{"type":"string","description":"The instrument identifier"}}},"InstrumentInfo":{"type":"object","description":"Extended information about a financial instrument.","required":["instrument_id","registry_url"],"properties":{"instrument_id":{"$ref":"#/components/schemas/InstrumentId"},"registry_url":{"type":"string","format":"uri","description":"URL of the token registry"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Error message"}}}}}}
```

## Get Token B information

> Returns token information for the second token in the pool. Note that this is not always the second token in the pool name.

```json
{"openapi":"3.0.3","info":{"title":"Tradecraft AMM HTTP API","version":"1.28.0"},"tags":[{"name":"Tokens","description":"Token and instrument information."}],"servers":[{"url":"https://api.tradecraft.fi/v1","description":"Mainnet"},{"url":"https://tradecraft.validator.test.canton.obsidian.systems/amm-http-api","description":"Testnet"},{"url":"https://tradecraft.validator.dev.canton.obsidian.systems/amm-http-api","description":"Devnet"}],"paths":{"/tokenB/{tokenA}/{tokenB}":{"get":{"summary":"Get Token B information","description":"Returns token information for the second token in the pool. Note that this is not always the second token in the pool name.","operationId":"getTokenB","tags":["Tokens"],"parameters":[{"$ref":"#/components/parameters/tokenA"},{"$ref":"#/components/parameters/tokenB"}],"responses":{"200":{"description":"Token B information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"AMM not found or token unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"parameters":{"tokenA":{"name":"tokenA","in":"path","required":true,"description":"The name/symbol of the first token (URL encoded).","schema":{"type":"string","enum":["CC","USDCx","CBTC","cETH","HANDL","EDELx","SBC"]}},"tokenB":{"name":"tokenB","in":"path","required":true,"description":"The name/symbol of the second token (URL encoded).","schema":{"type":"string","enum":["CC","USDCx","CBTC","cETH","HANDL","EDELx","SBC"]}}},"schemas":{"TokenResponse":{"type":"object","description":"Token information response.","required":["instrument_id","instrument_info"],"properties":{"instrument_id":{"$ref":"#/components/schemas/InstrumentId"},"instrument_info":{"$ref":"#/components/schemas/InstrumentInfo"}}},"InstrumentId":{"type":"object","description":"Unique identifier for a financial instrument.","required":["admin","id"],"properties":{"admin":{"type":"string","description":"The party administering the instrument"},"id":{"type":"string","description":"The instrument identifier"}}},"InstrumentInfo":{"type":"object","description":"Extended information about a financial instrument.","required":["instrument_id","registry_url"],"properties":{"instrument_id":{"$ref":"#/components/schemas/InstrumentId"},"registry_url":{"type":"string","format":"uri","description":"URL of the token registry"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Error message"}}}}}}
```

## Get LP Token information

> Returns instrument information for the liquidity provider token of the pool.

```json
{"openapi":"3.0.3","info":{"title":"Tradecraft AMM HTTP API","version":"1.28.0"},"tags":[{"name":"Tokens","description":"Token and instrument information."}],"servers":[{"url":"https://api.tradecraft.fi/v1","description":"Mainnet"},{"url":"https://tradecraft.validator.test.canton.obsidian.systems/amm-http-api","description":"Testnet"},{"url":"https://tradecraft.validator.dev.canton.obsidian.systems/amm-http-api","description":"Devnet"}],"paths":{"/lpToken/{tokenA}/{tokenB}":{"get":{"summary":"Get LP Token information","description":"Returns instrument information for the liquidity provider token of the pool.","operationId":"getLpToken","tags":["Tokens"],"parameters":[{"$ref":"#/components/parameters/tokenA"},{"$ref":"#/components/parameters/tokenB"}],"responses":{"200":{"description":"LP Token information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"LP token not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"parameters":{"tokenA":{"name":"tokenA","in":"path","required":true,"description":"The name/symbol of the first token (URL encoded).","schema":{"type":"string","enum":["CC","USDCx","CBTC","cETH","HANDL","EDELx","SBC"]}},"tokenB":{"name":"tokenB","in":"path","required":true,"description":"The name/symbol of the second token (URL encoded).","schema":{"type":"string","enum":["CC","USDCx","CBTC","cETH","HANDL","EDELx","SBC"]}}},"schemas":{"TokenResponse":{"type":"object","description":"Token information response.","required":["instrument_id","instrument_info"],"properties":{"instrument_id":{"$ref":"#/components/schemas/InstrumentId"},"instrument_info":{"$ref":"#/components/schemas/InstrumentInfo"}}},"InstrumentId":{"type":"object","description":"Unique identifier for a financial instrument.","required":["admin","id"],"properties":{"admin":{"type":"string","description":"The party administering the instrument"},"id":{"type":"string","description":"The instrument identifier"}}},"InstrumentInfo":{"type":"object","description":"Extended information about a financial instrument.","required":["instrument_id","registry_url"],"properties":{"instrument_id":{"$ref":"#/components/schemas/InstrumentId"},"registry_url":{"type":"string","format":"uri","description":"URL of the token registry"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Error message"}}}}}}
```

## List the physically settled tokens

> Returns the token symbols the venue settles into a holding.\
> Swap output in any other token goes to a trading balance.<br>

```json
{"openapi":"3.0.3","info":{"title":"Tradecraft AMM HTTP API","version":"1.28.0"},"tags":[{"name":"Tokens","description":"Token and instrument information."}],"servers":[{"url":"https://api.tradecraft.fi/v1","description":"Mainnet"},{"url":"https://tradecraft.validator.test.canton.obsidian.systems/amm-http-api","description":"Testnet"},{"url":"https://tradecraft.validator.dev.canton.obsidian.systems/amm-http-api","description":"Devnet"}],"paths":{"/physicalSettlementWhitelist":{"get":{"summary":"List the physically settled tokens","description":"Returns the token symbols the venue settles into a holding.\nSwap output in any other token goes to a trading balance.\n","operationId":"getPhysicalSettlementWhitelist","tags":["Tokens"],"responses":{"200":{"description":"The physically settled tokens","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhysicalSettlementWhitelistResponse"}}}}}}}},"components":{"schemas":{"PhysicalSettlementWhitelistResponse":{"type":"object","required":["physical_settlement_whitelist"],"properties":{"physical_settlement_whitelist":{"type":"array","description":"Token symbols the venue settles into a holding.\nSwap output in any other token goes to the actor's trading balance.\n","items":{"type":"string"}}}}}}}
```

## Get a token's allocation factory context

> Returns the registry's allocation-factory contract for a token and the choice context\
> for exercising AllocationFactory\_Allocate on it. Cached, refreshed every 24 hours.\
> CC/Amulet is not served. Read it from the Splice Scan API per submission.<br>

```json
{"openapi":"3.0.3","info":{"title":"Tradecraft AMM HTTP API","version":"1.28.0"},"tags":[{"name":"Tokens","description":"Token and instrument information."}],"servers":[{"url":"https://api.tradecraft.fi/v1","description":"Mainnet"},{"url":"https://tradecraft.validator.test.canton.obsidian.systems/amm-http-api","description":"Testnet"},{"url":"https://tradecraft.validator.dev.canton.obsidian.systems/amm-http-api","description":"Devnet"}],"paths":{"/allocation-factory/{token}":{"get":{"summary":"Get a token's allocation factory context","description":"Returns the registry's allocation-factory contract for a token and the choice context\nfor exercising AllocationFactory_Allocate on it. Cached, refreshed every 24 hours.\nCC/Amulet is not served. Read it from the Splice Scan API per submission.\n","operationId":"getAllocationFactoryContext","tags":["Tokens"],"parameters":[{"$ref":"#/components/parameters/token"}],"responses":{"200":{"description":"Allocation factory context","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllocationFactoryResponse"}}}},"400":{"description":"The token is missing, malformed, unknown, or is CC/Amulet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"No context is available for this token right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"parameters":{"token":{"name":"token","in":"path","required":true,"description":"The name/symbol of the token (URL encoded).","schema":{"type":"string"}}},"schemas":{"AllocationFactoryResponse":{"type":"object","description":"The registry's allocation-factory contract and the context for exercising it.","required":["factoryId","choiceContext","cachedAt"],"properties":{"factoryId":{"type":"string","description":"Contract ID to exercise AllocationFactory_Allocate on"},"choiceContext":{"type":"object","description":"The registry's choice-context envelope, not a Daml ChoiceContext.","required":["disclosedContracts","choiceContextData"],"properties":{"disclosedContracts":{"type":"array","description":"Disclosures for the submission, not for ExtraArgs","items":{"$ref":"#/components/schemas/DisclosedContract"}},"choiceContextData":{"type":"object","description":"The Daml ChoiceContext to pass as ExtraArgs.context"}}},"cachedAt":{"type":"string","format":"date-time","description":"When this context was last fetched from the registry"}}},"DisclosedContract":{"type":"object","description":"A disclosed contract blob from the Canton ledger, required for submitting transactions.","required":["templateId","contractId","createdEventBlob","synchronizerId"],"properties":{"templateId":{"type":"string","description":"Fully qualified template identifier (packageId:moduleName:entityName)"},"contractId":{"type":"string","description":"The contract ID on the ledger"},"createdEventBlob":{"type":"string","format":"byte","description":"Base64-encoded created event blob"},"synchronizerId":{"type":"string","description":"The synchronizer (domain) ID where this contract lives"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Error message"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tradecraft.fi/api/routes/tokens.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
