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

# Attach the strategy

> Register the strategy against the launch. The config must be byte-for-byte what prepare hashed. A coin's strategy is set once.



## OpenAPI

````yaml https://purps.lol/api/v1/openapi.json post /coins/{mint}/strategy/submit
openapi: 3.1.0
info:
  title: PURPS API
  version: 1.0.0
  description: >-
    Everything purps.lol can do, as JSON. Read the coin list, a coin's full page
    and the launchpad; launch coins on purps.lol, pump.fun and Robinhood Chain;
    wire an existing pump.fun coin's fees into a strategy. No key, no signup. A
    write is authorised by your own wallet's signature and every transaction is
    signed in your wallet, never by us. Every response is `{ ok: true, data }`
    or `{ ok: false, error }`. Cross-origin requests are allowed from any site.
servers:
  - url: https://purps.lol/api/v1
security: []
tags:
  - name: Coins
    description: Read what the site shows.
  - name: Launch on purps.lol
    description: Launch a coin on purps.lol. Prepare, sign, submit, send, poll.
  - name: Launch on pump.fun
    description: Launch straight on pump.fun with fees wired to a strategy.
  - name: Launch on Robinhood Chain
    description: Launch through Pons on Robinhood Chain.
  - name: Redirect a pump.fun coin
    description: Point an existing pump.fun coin's creator fees at a strategy.
  - name: Manage a coin
    description: Attach a strategy to a coin launched without one. Creator-signed.
  - name: Transactions
    description: Send a signed Solana transaction through our relay and watch it land.
paths:
  /coins/{mint}/strategy/submit:
    post:
      tags:
        - Manage a coin
      summary: Attach the strategy
      description: >-
        Register the strategy against the launch. The config must be
        byte-for-byte what prepare hashed. A coin's strategy is set once.
      operationId: submitStrategy
      parameters:
        - name: mint
          in: path
          required: true
          description: >-
            The token's mint address (Solana) or contract address (Robinhood
            Chain).
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StrategySubmit'
      responses:
        '200':
          description: Registered.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  data:
                    $ref: '#/components/schemas/StrategyResult'
        '401':
          description: Every failure carries the same envelope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Every failure carries the same envelope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Every failure carries the same envelope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Every failure carries the same envelope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Every failure carries the same envelope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    StrategySubmit:
      type: object
      properties:
        config:
          $ref: '#/components/schemas/Strategy'
          type: object
          description: Identical to what prepare received.
          required: true
        ts:
          type: integer
          description: The `ts` the prepare step returned.
          required: true
        signature:
          type: string
          description: >-
            Your wallet's signature over the prepared message. Base58 on Solana,
            0x-hex on Robinhood Chain.
          required: true
    StrategyResult:
      type: object
      properties:
        registered:
          type: boolean
          description: True once attached.
        mint:
          type: string
          description: The coin.
        url:
          type: string
          description: Its page.
    Error:
      type: object
      properties:
        ok:
          type: boolean
          description: Always false on a failure.
        error:
          type: string
          description: >-
            A short reason in plain words: `coin not found`, `too many
            requests`, `invalid wallet signature`.
    Strategy:
      type: object
      description: >-
        How a coin uses its fees. Basis points sum to 10000 across the three
        splits.
      properties:
        splitBuybackBps:
          type: integer
          description: Share of each fee that buys the coin back.
          required: true
        splitMarginBps:
          type: integer
          description: Share sent to the perp exchange as margin.
          required: true
        splitReserveBps:
          type: integer
          description: Share kept as a reserve that backs the positions.
          required: true
        perpLegs:
          type: array
          description: >-
            The positions to hold: `{ market, direction, leverage, weightBps,
            reserveMode }`. `market` from /markets, `leverage` a whole number
            within its cap, weights summing to 10000, `reserveMode` `defensive`
            or `none` (use the preset's `legReserveMode`). Empty means no perps,
            in which case margin and reserve must be 0.
          items:
            type: object
          required: true
        rewardMode:
          type: string
          description: >-
            What profits do: `burn` (default), `holders` pays the coin itself,
            `backed` pays `payoutMint`. Paying coins need `holderPayoutsEnabled`
            in /launch-options.
          enum:
            - burn
            - holders
            - backed
        payoutMint:
          type: string
          description: >-
            `backed` only: the asset holders are paid in, from /launch-options
            `payoutAssets` or any Solana mint with a real market.
          nullable: true
        payoutMint2:
          type: string
          description: >-
            Optional second payout asset for any paying coin; each buyback
            splits in half between the two.
          nullable: true
        strategy:
          type: object
          description: >-
            The trading rules: `{ preset, tpTriggerPct, tpSlicePct, rungCount,
            rungMode }`. Take a preset's `config.strategy` from /launch-options,
            or set your own.
          nullable: true

````