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

# Chain identity and signing domain

> Everything a client needs to sign requests for this chain without hard-coding addresses.



## OpenAPI

````yaml /developer/trading-api/openapi.json get /v1/{chain}
openapi: 3.1.0
info:
  title: Gains Trading API
  version: 1.0.0
  description: >-
    Native REST and WebSocket API for trading on Gains Network.
    Resource-oriented, JSON in and out, decimal strings for every price and
    size, one EIP-712 signing scheme, and an order lifecycle that hides the
    oracle two-step.
servers:
  - url: https://api.gains.trade
security: []
tags:
  - name: Markets
    description: Public market data
  - name: Account
    description: 'Private reads: balances, positions, orders, fills'
  - name: Orders
    description: Place, update and cancel orders
  - name: Positions
    description: Close and manage open positions
  - name: Agents
    description: Non-custodial agent authorisation
  - name: System
    description: Health
paths:
  /v1/{chain}:
    get:
      tags:
        - System
      summary: Chain identity and signing domain
      description: >-
        Everything a client needs to sign requests for this chain without
        hard-coding addresses.
      operationId: getChainInfo
      parameters:
        - schema:
            type: string
            enum:
              - arbitrum
              - base
              - polygon
              - megaeth
              - arbitrum-sepolia
            example: arbitrum
          required: true
          name: chain
          in: path
      responses:
        '200':
          description: Chain info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChainInfo'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ChainInfo:
      type: object
      properties:
        chain:
          type: string
          enum:
            - arbitrum
            - base
            - polygon
            - megaeth
            - arbitrum-sepolia
          example: arbitrum
        chainId:
          type: integer
        diamond:
          type: string
          pattern: ^0x[0-9a-fA-F]{40}$
          example: '0x73b3A111C5BCCf9086c97B96e0AbAad69Dc4f523'
          description: Gains Diamond, the EIP-712 verifying contract of this chain.
        relayer:
          type:
            - string
            - 'null'
          pattern: ^0x[0-9a-fA-F]{40}$
          example: '0x73b3A111C5BCCf9086c97B96e0AbAad69Dc4f523'
          description: >-
            Hyperliquid facade relayer, the only sponsored path; null when the
            deployment serves the facade read-only. Native agents broadcast
            their own transactions.
        testnet:
          type: boolean
        signing:
          type: object
          properties:
            domain:
              type: object
              properties:
                name:
                  type: string
                version:
                  type: string
                chainId:
                  type: integer
                verifyingContract:
                  type: string
                  pattern: ^0x[0-9a-fA-F]{40}$
                  example: '0x73b3A111C5BCCf9086c97B96e0AbAad69Dc4f523'
              required:
                - name
                - version
                - chainId
                - verifyingContract
            fields:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  type:
                    type: string
                required:
                  - name
                  - type
            emptyBodyHash:
              type: string
          required:
            - domain
            - fields
            - emptyBodyHash
      required:
        - chain
        - chainId
        - diamond
        - relayer
        - testnet
        - signing
    Error:
      type: object
      properties:
        code:
          type: string
          enum:
            - VALIDATION_ERROR
            - UNAUTHENTICATED
            - INVALID_SIGNATURE
            - TIMESTAMP_OUT_OF_WINDOW
            - NONCE_REUSED
            - AGENT_UNKNOWN
            - API_KEY_UNKNOWN
            - AGENT_NOT_DELEGATED
            - AGENT_EXPIRED
            - AGENT_REVOKED
            - SCOPE_READ_ONLY
            - SCOPE_MARKET_NOT_ALLOWED
            - SCOPE_LEVERAGE_EXCEEDED
            - SCOPE_SPEND_CAP_EXCEEDED
            - TRADER_MISMATCH
            - CHAIN_NOT_FOUND
            - CHAIN_READ_ONLY
            - MARKET_NOT_FOUND
            - ORDER_NOT_FOUND
            - POSITION_NOT_FOUND
            - AGENT_NOT_FOUND
            - IDEMPOTENCY_CONFLICT
            - ORDER_NOT_MODIFIABLE
            - PRECISION_ERROR
            - LEVERAGE_OUT_OF_RANGE
            - SIZE_BELOW_MINIMUM
            - MARKET_CLOSED
            - COLLATERAL_NOT_SUPPORTED
            - SIMULATION_REVERTED
            - SUBMISSION_MISMATCH
            - UNSUPPORTED
            - RATE_LIMITED
            - INTERNAL
            - UPSTREAM_UNAVAILABLE
            - NOT_READY
        message:
          type: string
        details:
          type: object
          additionalProperties: {}
      required:
        - code
        - message

````