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

# Prepare exchange registration

> Generates exchange-specific registration data and returns sign data for the user to sign, along with an opaque registration token.



## OpenAPI

````yaml https://vooi-api-app.fly.dev/swagger/json post /user-exchange/{exchange}/register/prepare
openapi: 3.1.0
info:
  title: VOOI API
  description: Unified perps API
  version: '1.0'
  contact: {}
servers:
  - url: https://perps-api.vooi.io
security: []
tags: []
paths:
  /user-exchange/{exchange}/register/prepare:
    post:
      tags:
        - User exchange
      summary: Prepare exchange registration
      description: >-
        Generates exchange-specific registration data and returns sign data for
        the user to sign, along with an opaque registration token.
      operationId: RegistrationController_prepareRegistration
      parameters:
        - name: exchange
          required: true
          in: path
          schema:
            type: string
            enum:
              - aster
              - binance
              - bybit
              - extended
              - gate
              - hyperliquid
              - lighter
              - mexc
              - ondo
              - robinhood
          description: Supported perpetual exchange
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrepareRegistrationBody'
      responses:
        '200':
          description: Registration preparation data
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/AsterPrepareRegistrationResponseDto'
                  - $ref: >-
                      #/components/schemas/ExtendedPrepareRegistrationResponseDto
                  - $ref: >-
                      #/components/schemas/HyperliquidPrepareRegistrationResponseDto
                  - $ref: '#/components/schemas/LighterPrepareRegistrationResponseDto'
                  - $ref: '#/components/schemas/OndoPrepareRegistrationResponseDto'
                  - $ref: >-
                      #/components/schemas/RobinhoodPrepareRegistrationResponseDto
                type: object
                discriminator:
                  propertyName: exchange
                  mapping:
                    aster:
                      $ref: '#/components/schemas/AsterPrepareRegistrationResponseDto'
                    extended:
                      $ref: >-
                        #/components/schemas/ExtendedPrepareRegistrationResponseDto
                    hyperliquid:
                      $ref: >-
                        #/components/schemas/HyperliquidPrepareRegistrationResponseDto
                    lighter:
                      $ref: >-
                        #/components/schemas/LighterPrepareRegistrationResponseDto
                    ondo:
                      $ref: '#/components/schemas/OndoPrepareRegistrationResponseDto'
                    robinhood:
                      $ref: >-
                        #/components/schemas/RobinhoodPrepareRegistrationResponseDto
      security:
        - bearer: []
components:
  schemas:
    PrepareRegistrationBody:
      type: object
      properties:
        address:
          type: string
          description: User address
          example: '0x1234567890abcdef1234567890abcdef12345678'
        agentExpiry:
          description: Aster agent expiry timestamp (ms)
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
        apiKeyIndex:
          description: Lighter API key index
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
        builderAddress:
          description: >-
            Aster builder address signed off in the API agent approval. Defaults
            to a server-side constant when omitted
          type: string
          example: '0x1234567890abcdef1234567890abcdef12345678'
        builderName:
          description: >-
            Aster builder display name. Defaults to a server-side constant when
            omitted
          type: string
          minLength: 1
        maxFeeRate:
          description: >-
            Aster builder max fee-rate cap as a decimal string, where 3 bps
            equals 3 / 10,000 = 0.0003. Defaults to a server-side constant when
            omitted
          example: '0.0003'
          type: string
          minLength: 1
        referralCode:
          description: >-
            Referral code bound to the new account right after registration on
            aster, hyperliquid, lighter, robinhood, extended and ondo. The VOOI
            code is applied when you omit it
          type: string
          minLength: 1
      required:
        - address
      title: PrepareRegistrationBody
    AsterPrepareRegistrationResponseDto:
      type: object
      properties:
        exchange:
          type: string
          enum:
            - aster
        registrationToken:
          type: string
          description: Opaque token. Pass back unchanged in the execute request
        signData:
          type: array
          prefixItems:
            - type: object
              properties:
                domain:
                  type: object
                  properties:
                    chainId:
                      type: number
                    name:
                      type: string
                    verifyingContract:
                      type: string
                      description: Ethereum address
                      example: '0x1234567890abcdef1234567890abcdef12345678'
                    version:
                      type: string
                  required:
                    - name
                    - version
                message:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                primaryType:
                  type: string
                types:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        type:
                          type: string
                      required:
                        - name
                        - type
              required:
                - domain
                - message
                - primaryType
                - types
            - type: object
              properties:
                domain:
                  type: object
                  properties:
                    chainId:
                      type: number
                    name:
                      type: string
                    verifyingContract:
                      type: string
                      description: Ethereum address
                      example: '0x1234567890abcdef1234567890abcdef12345678'
                    version:
                      type: string
                  required:
                    - name
                    - version
                message:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                primaryType:
                  type: string
                types:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        type:
                          type: string
                      required:
                        - name
                        - type
              required:
                - domain
                - message
                - primaryType
                - types
          items: false
          minItems: 2
          maxItems: 2
          description: >-
            Two EIP-712 messages to sign in order: [0] register and approve the
            VOOI API agent (registerAndApproveAgent), [1] approve the VOOI
            builder for order-time fee attribution.
      required:
        - exchange
        - registrationToken
        - signData
      title: AsterPrepareRegistrationResponse
    ExtendedPrepareRegistrationResponseDto:
      type: object
      properties:
        exchange:
          type: string
          enum:
            - extended
        registrationToken:
          type: string
          description: Opaque token. Pass back unchanged in the execute request
        signData:
          type: array
          prefixItems:
            - type: object
              properties:
                domain:
                  type: object
                  properties:
                    name:
                      type: string
                  required:
                    - name
                message:
                  type: object
                  properties:
                    accountIndex:
                      type: integer
                      minimum: -9007199254740991
                      maximum: 9007199254740991
                    tosAccepted:
                      type: boolean
                    wallet:
                      type: string
                      description: Ethereum address
                      example: '0x1234567890abcdef1234567890abcdef12345678'
                  required:
                    - accountIndex
                    - tosAccepted
                    - wallet
                primaryType:
                  type: string
                  enum:
                    - AccountCreation
                types:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        type:
                          type: string
                      required:
                        - name
                        - type
              required:
                - domain
                - message
                - primaryType
                - types
              description: >-
                EIP-712 typed data to derive the Stark key pair from the wallet
                signature
            - type: object
              properties:
                domain:
                  type: object
                  properties:
                    name:
                      type: string
                  required:
                    - name
                message:
                  type: object
                  properties:
                    accountIndex:
                      type: integer
                      minimum: -9007199254740991
                      maximum: 9007199254740991
                    action:
                      type: string
                    host:
                      type: string
                    time:
                      type: string
                    tosAccepted:
                      type: boolean
                    wallet:
                      type: string
                      description: Ethereum address
                      example: '0x1234567890abcdef1234567890abcdef12345678'
                  required:
                    - accountIndex
                    - action
                    - host
                    - time
                    - tosAccepted
                    - wallet
                primaryType:
                  type: string
                  enum:
                    - AccountRegistration
                types:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        type:
                          type: string
                      required:
                        - name
                        - type
              required:
                - domain
                - message
                - primaryType
                - types
              description: EIP-712 typed data sent as l1Signature on /auth/onboard
            - type: object
              properties:
                message:
                  type: string
                type:
                  type: string
                  enum:
                    - personalSign
              required:
                - message
                - type
              description: >-
                Plain-text message to sign with personal_sign for the api-key
                creation call
          items: false
          minItems: 3
          maxItems: 3
          description: >-
            Three messages to sign in order: [0] EIP-712 AccountCreation (used
            to derive Stark keys), [1] EIP-712 AccountRegistration (sent as
            l1Signature on /auth/onboard), [2] personal_sign payload for the
            API-key creation call.
      required:
        - exchange
        - registrationToken
        - signData
      title: ExtendedPrepareRegistrationResponse
    HyperliquidPrepareRegistrationResponseDto:
      type: object
      properties:
        exchange:
          type: string
          enum:
            - hyperliquid
        registrationToken:
          type: string
          description: Opaque token. Pass back unchanged in the execute request
        signData:
          type: object
          properties:
            domain:
              type: object
              properties:
                chainId:
                  type: number
                name:
                  type: string
                verifyingContract:
                  type: string
                  description: Ethereum address
                  example: '0x1234567890abcdef1234567890abcdef12345678'
                version:
                  type: string
              required:
                - name
                - version
            message:
              type: object
              propertyNames:
                type: string
              additionalProperties: {}
            primaryType:
              type: string
            types:
              type: object
              propertyNames:
                type: string
              additionalProperties:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                    type:
                      type: string
                  required:
                    - name
                    - type
          required:
            - domain
            - message
            - primaryType
            - types
          description: EIP-712 typed data to sign with your wallet
      required:
        - exchange
        - registrationToken
        - signData
      title: HyperliquidPrepareRegistrationResponse
    LighterPrepareRegistrationResponseDto:
      type: object
      properties:
        exchange:
          type: string
          enum:
            - lighter
        registrationToken:
          type: string
          description: Opaque token. Pass back unchanged in the execute request
        signData:
          type: string
          description: Plain-text message to sign with your wallet
      required:
        - exchange
        - registrationToken
        - signData
      title: LighterPrepareRegistrationResponse
    OndoPrepareRegistrationResponseDto:
      type: object
      properties:
        exchange:
          type: string
          enum:
            - ondo
        registrationToken:
          type: string
          description: Opaque token. Pass back unchanged in the execute request
        signData:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
              enum:
                - personalSign
          required:
            - message
            - type
          description: >-
            Sign-In-With-Ethereum message to sign with personal_sign; completing
            this login creates the Ondo account when needed and issues the API
            key
      required:
        - exchange
        - registrationToken
        - signData
      title: OndoPrepareRegistrationResponse
    RobinhoodPrepareRegistrationResponseDto:
      type: object
      properties:
        exchange:
          type: string
          enum:
            - robinhood
        registrationToken:
          type: string
          description: Opaque token. Pass back unchanged in the execute request
        signData:
          type: string
          description: Plain-text message to sign with your wallet
      required:
        - exchange
        - registrationToken
        - signData
      title: RobinhoodPrepareRegistrationResponse
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.