# Token Trading

## Token trading info and company stack statistics

> Provides trading readiness information for tokens (ensuring a company stack exists) and aggregate company stack statistics.<br>

```json
{"openapi":"3.0.3","info":{"title":"Indexify API","version":"0.1.12-beta"},"servers":[{"url":"https://api.indexify.finance","description":"Production"}],"security":[{},{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY","description":"API key with the `ix_` prefix. You can generate an API Key by navigating to Settings -> API Key in the web app. Pass it in the `X-API-KEY` header on every request."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}},"paths":{"/api/token_trading.php":{"post":{"tags":["Token Trading"],"summary":"Token trading info and company stack statistics","description":"Provides trading readiness information for tokens (ensuring a company stack exists) and aggregate company stack statistics.\n","parameters":[{"name":"action","in":"query","required":true,"schema":{"type":"string","enum":["get_trading_info","get_company_stats"]}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"oneOf":[{"title":"get_trading_info","type":"object","description":"At least one of token_address or token_id is required.\n","properties":{"token_address":{"type":"string","description":"Solana token mint address."},"token_id":{"type":"integer","description":"Internal token ID."}}},{"title":"get_company_stats","description":"No request body required.","type":"object"}]}}}},"responses":{"200":{"description":"Successful response. Shape varies by action.","content":{"application/json":{"schema":{"oneOf":[{"title":"TradingInfoResponse","type":"object","properties":{"company_stack_id":{"type":"integer","description":"ID of the company stack for this token."},"token":{"type":"object","properties":{"id":{"type":"integer"},"chain":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"notes":{"type":"string","nullable":true},"image_url":{"type":"string","nullable":true},"pool_address":{"type":"string","nullable":true},"decimals":{"type":"integer"},"cg_id":{"type":"string","nullable":true},"archived":{"type":"boolean"},"last_updated":{"type":"string","nullable":true}}},"trading_enabled":{"type":"boolean"},"display_name":{"type":"string"},"stack_name":{"type":"string"},"slug":{"type":"string","nullable":true},"message":{"type":"string"}}},{"title":"CompanyStatsResponse","type":"object","properties":{"total_company_stacks":{"type":"integer"}}}]}}}},"400":{"description":"Missing token_address and token_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Token not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Failed to prepare token for trading.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```
