Lighter referral API

The referral API from Lighter — 6 operation(s) for referral.

Operations 6

GET /api/v1/referral/points referral_points #
POST /api/v1/referral/create referral_create #
GET /api/v1/referral/get referral_get #
POST /api/v1/referral/kickback/update referral_kickback_update #
POST /api/v1/referral/update referral_update #
POST /api/v1/referral/use referral_use #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lighter-referral-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lighter-referral-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Lighter account Referral API
  version: '1.0'
servers:
- url: https://mainnet.zklighter.elliot.ai
tags:
- name: referral
paths:
  /api/v1/referral/points:
    get:
      summary: referral_points
      operationId: referral_points
      tags:
      - referral
      description: Get referral points
      parameters:
      - name: authorization
        in: header
        required: true
        schema:
          type: string
      - name: account_index
        in: query
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferralPoints'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultCode'
  /api/v1/referral/create:
    post:
      summary: referral_create
      operationId: referral_create
      tags:
      - referral
      description: Create referral code
      parameters:
      - name: authorization
        in: header
        required: false
        description: ' make required after integ is done'
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ReqCreateReferralCode'
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferralCode'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultCode'
  /api/v1/referral/get:
    get:
      summary: referral_get
      operationId: referral_get
      tags:
      - referral
      description: Get referral code
      parameters:
      - name: authorization
        in: query
        required: false
        description: ' make required after integ is done'
        schema:
          type: string
      - name: auth
        in: query
        required: false
        description: ' made optional to support header auth clients'
        schema:
          type: string
      - name: account_index
        in: query
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferralCode'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultCode'
  /api/v1/referral/kickback/update:
    post:
      summary: referral_kickback_update
      operationId: referral_kickback_update
      tags:
      - referral
      description: Update kickback percentage for referral rewards (allowed once per day)
      parameters:
      - name: authorization
        in: header
        required: false
        description: ' make required after integ is done'
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ReqUpdateKickback'
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RespUpdateKickback'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultCode'
  /api/v1/referral/update:
    post:
      summary: referral_update
      operationId: referral_update
      tags:
      - referral
      description: Update referral code (allowed once per account)
      parameters:
      - name: authorization
        in: header
        required: false
        description: ' make required after integ is done'
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ReqUpdateReferralCode'
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RespUpdateReferralCode'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultCode'
  /api/v1/referral/use:
    post:
      summary: referral_use
      operationId: referral_use
      tags:
      - referral
      description: Use a referral code. You can change this at a later time.
      parameters:
      - name: authorization
        in: header
        required: false
        description: ' make required after integ is done'
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ReqUseReferralCode'
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultCode'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultCode'
components:
  schemas:
    RespUpdateKickback:
      type: object
      properties:
        code:
          type: integer
          format: int32
          example: '200'
        message:
          type: string
        success:
          type: boolean
          format: boolean
          example: 'true'
      title: RespUpdateKickback
      required:
      - code
      - success
    ReqCreateReferralCode:
      type: object
      properties:
        auth:
          type: string
          description: ' made optional to support header auth clients'
        account_index:
          type: integer
          format: int64
      title: ReqCreateReferralCode
      required:
      - account_index
    ResultCode:
      type: object
      properties:
        code:
          type: integer
          format: int32
          example: '200'
        message:
          type: string
      title: ResultCode
      required:
      - code
    ReferralPointEntry:
      type: object
      properties:
        l1_address:
          type: string
        total_points:
          type: number
          format: float
          example: '1000.01'
        week_points:
          type: number
          format: float
          example: '1000.01'
        total_reward_points:
          type: number
          format: float
          example: '200'
        week_reward_points:
          type: number
          format: float
          example: '200'
        reward_point_multiplier:
          type: string
          example: '0.1'
      title: ReferralPointEntry
      required:
      - l1_address
      - total_points
      - week_points
      - total_reward_points
      - week_reward_points
      - reward_point_multiplier
    RespUpdateReferralCode:
      type: object
      properties:
        code:
          type: integer
          format: int32
          example: '200'
        message:
          type: string
        success:
          type: boolean
          format: boolean
          example: 'true'
      title: RespUpdateReferralCode
      required:
      - code
      - success
    ReferralCode:
      type: object
      properties:
        code:
          type: integer
          format: int32
          example: '200'
        message:
          type: string
        referral_code:
          type: string
          example: 5V24K3MJ
        remaining_usage:
          type: integer
          format: int32
          example: '3'
      title: ReferralCode
      required:
      - code
      - referral_code
      - remaining_usage
    ReqUseReferralCode:
      type: object
      properties:
        auth:
          type: string
          description: ' made optional to support header auth clients'
        l1_address:
          type: string
        referral_code:
          type: string
        discord:
          type: string
        telegram:
          type: string
        x:
          type: string
        signature:
          type: string
      title: ReqUseReferralCode
      required:
      - l1_address
      - referral_code
      - x
    ReqUpdateKickback:
      type: object
      properties:
        auth:
          type: string
          description: ' made optional to support header auth clients'
        account_index:
          type: integer
          format: int64
        kickback_percentage:
          type: number
          format: double
          maximum: 100
      title: ReqUpdateKickback
      required:
      - account_index
      - kickback_percentage
    ReqUpdateReferralCode:
      type: object
      properties:
        auth:
          type: string
          description: ' made optional to support header auth clients'
        account_index:
          type: integer
          format: int64
        new_referral_code:
          type: string
      title: ReqUpdateReferralCode
      required:
      - account_index
      - new_referral_code
    ReferralPoints:
      type: object
      properties:
        referrals:
          type: array
          items:
            $ref: '#/components/schemas/ReferralPointEntry'
        user_total_points:
          type: number
          format: float
          example: '1000'
        user_last_week_points:
          type: number
          format: float
          example: '1000'
        user_total_referral_reward_points:
          type: number
          format: float
          example: '1000'
        user_last_week_referral_reward_points:
          type: number
          format: float
          example: '1000'
        reward_point_multiplier:
          type: string
          example: '0.1'
      title: ReferralPoints
      required:
      - referrals
      - user_total_points
      - user_last_week_points
      - user_total_referral_reward_points
      - user_last_week_referral_reward_points
      - reward_point_multiplier
  securitySchemes:
    apiKey:
      type: apiKey
      description: Enter JWT Bearer token **_only_**
      name: Authorization
      in: header