> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flux.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Token by Market

> Look up the ERC-1155 token ID for a specific prediction market and outcome side. Returns the token metadata including its on-chain ID.



## OpenAPI

````yaml openapi.json get /v1/tokens/market/{marketId}/{side}
openapi: 3.0.0
info:
  title: Swaps API
  description: The Swaps API documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://swap-api.flux.fun
    description: Production
  - url: http://localhost:3000
    description: Development
security: []
tags: []
paths:
  /v1/tokens/market/{marketId}/{side}:
    get:
      tags:
        - Prediction Markets & Portfolio
      summary: Get Token by Market
      description: >-
        Look up the ERC-1155 token ID for a specific prediction market and
        outcome side. Returns the token metadata including its on-chain ID.
      operationId: TokensController_getTokenByMarket
      parameters:
        - name: marketId
          required: true
          in: path
          description: The prediction market identifier
          schema:
            type: string
        - name: side
          required: true
          in: path
          description: Market outcome side (yes or no)
          schema:
            type: string
        - name: exchange
          required: false
          in: query
          description: 'Exchange name (default: Kalshi)'
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenMetadataResponseDto'
components:
  schemas:
    TokenMetadataResponseDto:
      type: object
      properties:
        name:
          type: string
          example: Bitcoin $100K by Dec 31 - YES
          description: Token name
        description:
          type: string
          example: Prediction market token for Bitcoin reaching $100,000
          description: Token description
        properties:
          description: Extended token properties
          allOf:
            - $ref: '#/components/schemas/TokenPropertiesDto'
      required:
        - name
        - description
        - properties
    TokenPropertiesDto:
      type: object
      properties:
        decimals:
          type: number
          example: 0
          description: Token decimals
        marketId:
          type: string
          example: KXBTC-24DEC31-T100K
          description: Market identifier
        outcome:
          type: string
          example: 'yes'
          description: Market outcome (yes/no)
        tokenId:
          type: string
          example: 0x123...
          description: On-chain token ID
      required:
        - decimals
        - marketId
        - outcome
        - tokenId

````