Lighter info API

The info API from Lighter — 5 operation(s) for info.

OpenAPI Specification

lighter-info-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Lighter account info API
  version: ''
servers:
- url: https://mainnet.zklighter.elliot.ai
tags:
- name: info
paths:
  /api/v1/transferFeeInfo:
    get:
      summary: transferFeeInfo
      operationId: transferFeeInfo
      tags:
      - info
      description: Transfer fee info
      parameters:
      - name: authorization
        in: header
        required: true
        schema:
          type: string
      - name: account_index
        in: query
        required: true
        schema:
          type: integer
          format: int64
      - name: to_account_index
        in: query
        required: false
        schema:
          type: integer
          format: int64
          default: '-1'
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransferFeeInfo'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultCode'
  /api/v1/withdrawalDelay:
    get:
      summary: withdrawalDelay
      operationId: withdrawalDelay
      tags:
      - info
      description: Withdrawal delay in seconds
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RespWithdrawalDelay'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultCode'
  /api/v1/layer1BasicInfo:
    get:
      summary: layer1BasicInfo
      operationId: layer1BasicInfo
      tags:
      - info
      description: Get zklighter l1 general info, including contract address and rpc info
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Layer1BasicInfo'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultCode'
  /api/v1/systemConfig:
    get:
      summary: systemConfig
      operationId: systemConfig
      tags:
      - info
      description: Get system config
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemConfig'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultCode'
  /api/v1/syntheticSpotInfo:
    get:
      summary: syntheticSpotInfo
      operationId: syntheticSpotInfo
      tags:
      - info
      description: 'Get synthetic spot info for a symbol. For complete details see: https://docs.lighter.xyz/trading/real-world-assets-rwas/us-equity-indices'
      parameters:
      - name: symbol
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RespSyntheticSpotInfo'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultCode'
components:
  schemas:
    ContractAddress:
      type: object
      properties:
        name:
          type: string
          example: '1'
        address:
          type: string
          example: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8'
      title: ContractAddress
      required:
      - name
      - address
    ValidatorInfo:
      type: object
      properties:
        address:
          type: string
          example: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8'
        is_active:
          type: boolean
          format: boolean
          example: 'true'
      title: ValidatorInfo
      required:
      - address
      - is_active
    ResultCode:
      type: object
      properties:
        code:
          type: integer
          format: int32
          example: '200'
        message:
          type: string
      title: ResultCode
      required:
      - code
    L1ProviderInfo:
      type: object
      properties:
        chainId:
          type: integer
          format: int64
          example: '1'
        networkId:
          type: integer
          format: int64
          example: '1'
        latestBlockNumber:
          type: integer
          format: int64
          example: '45434'
      title: L1ProviderInfo
      required:
      - chainId
      - networkId
      - latestBlockNumber
    SystemConfig:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        liquidity_pool_index:
          type: integer
          format: int64
        staking_pool_index:
          type: integer
          format: int64
        funding_fee_rebate_account_index:
          type: integer
          format: int64
        liquidity_pool_cooldown_period:
          type: integer
          format: int64
        staking_pool_lockup_period:
          type: integer
          format: int64
        max_integrator_perps_maker_fee:
          type: integer
          format: int32
        max_integrator_perps_taker_fee:
          type: integer
          format: int32
        max_integrator_spot_maker_fee:
          type: integer
          format: int32
        max_integrator_spot_taker_fee:
          type: integer
          format: int32
        market_maker_incentive_account_index:
          type: integer
          format: int64
          example: '3'
      required:
      - max_integrator_perps_maker_fee
      - max_integrator_perps_taker_fee
      - max_integrator_spot_maker_fee
      - max_integrator_spot_taker_fee
      - code
      - funding_fee_rebate_account_index
      - liquidity_pool_cooldown_period
      - liquidity_pool_index
      - staking_pool_index
      - staking_pool_lockup_period
      - market_maker_incentive_account_index
    RespSyntheticSpotInfo:
      type: object
      properties:
        code:
          type: integer
          format: int32
          example: '200'
        message:
          type: string
        bps_per_day:
          type: number
          format: double
        expiry_time_ms:
          type: integer
          format: int64
        spot_close_ms:
          type: integer
          format: int64
        source:
          type: string
        symbol:
          type: string
      title: RespSyntheticSpotInfo
      required:
      - code
      - bps_per_day
      - expiry_time_ms
      - spot_close_ms
      - source
      - symbol
    Layer1BasicInfo:
      type: object
      properties:
        code:
          type: integer
          format: int32
          example: '200'
        message:
          type: string
        l1_providers:
          type: array
          items:
            $ref: '#/components/schemas/L1ProviderInfo'
        l1_providers_health:
          type: boolean
          format: boolean
          example: 'true'
        validator_info:
          type: array
          items:
            $ref: '#/components/schemas/ValidatorInfo'
        contract_addresses:
          type: array
          items:
            $ref: '#/components/schemas/ContractAddress'
        latest_l1_generic_block:
          type: integer
          format: int64
          example: '45434'
        latest_l1_governance_block:
          type: integer
          format: int64
          example: '45434'
        latest_l1_desert_block:
          type: integer
          format: int64
          example: '45434'
      title: Layer1BasicInfo
      required:
      - code
      - l1_providers
      - l1_providers_health
      - validator_info
      - contract_addresses
      - latest_l1_generic_block
      - latest_l1_governance_block
      - latest_l1_desert_block
    RespWithdrawalDelay:
      type: object
      properties:
        seconds:
          type: integer
          format: int64
          example: '86400'
      title: RespWithdrawalDelay
      required:
      - seconds
    TransferFeeInfo:
      type: object
      properties:
        code:
          type: integer
          format: int32
          example: '200'
        message:
          type: string
        transfer_fee_usdc:
          type: integer
          format: int64
      title: TransferFeeInfo
      required:
      - code
      - transfer_fee_usdc
  securitySchemes:
    apiKey:
      type: apiKey
      description: Enter JWT Bearer token **_only_**
      name: Authorization
      in: header