Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/pacifica-fi/docs-migrate/llms.txt

Use this file to discover all available pages before exploring further.

The Pacifica Builder Program lets third-party developers earn fees on orders they route through the Pacifica API on behalf of their users. By embedding a builder_code in order creation requests, approved builders receive a share of the fees generated by those orders. Up to 10,000,000 points have been set aside to reward teams building on Pacifica, with rewards distributed based on each team’s measurable contribution to platform growth.
As of March 12th, 2026, the Builder Rewards Program has been extended by an additional three months. Volume 2 runs from March 12th, 2026 to June 12th, 2026. Only teams that make significant contributions to Pacifica’s development are eligible for point rewards.

How Builder Codes Work

A builder code is a short alphanumeric identifier (max 16 characters) that uniquely identifies your integration. When included in an order payload, the Pacifica API attributes the order to your builder account and applies your configured fee rate on top of the platform’s standard fees. Key rules:
  • The user must explicitly approve your builder code before you can include it on their orders
  • Users can revoke approval at any time
  • Orders will be rejected if the user’s approved max_fee_rate is lower than your builder’s configured fee_rate
  • Builder codes must be alphanumeric and no more than 16 characters
{
  "builder_code": "MYAPP"
}

Integration Steps

1

Request User Authorization

Before placing any orders with your builder code, the user must sign an approval message containing your builder_code and the maximum fee rate they consent to (max_fee_rate).Data to sign:
{
  "timestamp": "<ms>",
  "expiry_window": 5000,
  "type": "approve_builder_code",
  "data": {
    "builder_code": "YOUR_CODE",
    "max_fee_rate": "0.001"
  }
}
After generating the signature per the signing implementation, submit the complete payload:
{
  "account": "6ETn....",
  "agent_wallet": null,
  "signature": "5j1Vy9...",
  "timestamp": 1748970123456,
  "expiry_window": 5000,
  "builder_code": "YOUR_CODE",
  "max_fee_rate": "0.001"
}
Endpoint: POST https://api.pacifica.fi/api/v1/account/builder_codes/approve
The user’s max_fee_rate must be greater than or equal to your builder’s configured fee_rate. Orders will be rejected if this condition is not met.
2

Include Your Builder Code in Order Requests

Once a user has approved your code, include builder_code in the data object of every supported order creation request.Supported REST endpoints:
  • POST /api/v1/orders/create_market
  • POST /api/v1/orders/create
  • POST /api/v1/orders/stop/create
  • POST /api/v1/positions/tpsl
Supported WebSocket actions:
  • create_market_order
  • create_limit_order
  • create_stop_order
  • set_position_tpsl
Example — Market order with builder code (data to sign):
{
  "timestamp": 1716200000000,
  "expiry_window": 30000,
  "type": "create_market_order",
  "data": {
    "symbol": "BTC",
    "amount": "0.1",
    "side": "bid",
    "slippage_percent": "0.5",
    "reduce_only": false,
    "client_order_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "builder_code": "YOUR_CODE"
  }
}
Example — Limit order with builder code (data to sign):
{
  "timestamp": 1716200000000,
  "expiry_window": 30000,
  "type": "create_order",
  "data": {
    "symbol": "BTC",
    "amount": "0.1",
    "side": "bid",
    "tick_level": 1000,
    "tif": "gtc",
    "reduce_only": false,
    "client_order_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "builder_code": "YOUR_CODE"
  }
}
Example — TP/SL with builder code (data to sign):
{
  "timestamp": 1716200000000,
  "expiry_window": 30000,
  "type": "set_position_tpsl",
  "data": {
    "symbol": "BTC",
    "side": "bid",
    "take_profit": {
      "stop_price": "55000",
      "limit_price": "54950",
      "client_order_id": "e36ac10b-58cc-4372-a567-0e02b2c3d479"
    },
    "stop_loss": {
      "stop_price": "48000",
      "limit_price": "47950",
      "client_order_id": "d25ac10b-58cc-4372-a567-0e02b2c3d479"
    },
    "builder_code": "YOUR_CODE"
  }
}
For TP/SL orders, builder_code is provided at the top level of the data object — not inside the individual take_profit or stop_loss objects.

Managing Your Builder Code

Update Fee Rate

Builder account owners can update the fee rate their code charges at any time. Data to sign:
{
  "timestamp": "<ms>",
  "expiry_window": 5000,
  "type": "update_builder_code_fee_rate",
  "data": {
    "builder_code": "YOUR_CODE",
    "fee_rate": "0.05"
  }
}
Endpoint: POST https://api.pacifica.fi/api/v1/builder/update_fee_rate

Check User Approvals

Query which builder codes a specific user has approved: Endpoint: GET https://api.pacifica.fi/api/v1/account/builder_codes/approvals?account=6ETn.... Response:
[
  {
    "builder_code": "YOUR_CODE",
    "description": "Test Builder Integration",
    "max_fee_rate": "0.001",
    "updated_at": 1748970123456
  }
]

Revoke Authorization

Users can revoke a previously granted builder code approval at any time by signing a revocation message. Data to sign:
{
  "timestamp": 1748970123456,
  "expiry_window": 5000,
  "type": "revoke_builder_code",
  "data": {
    "builder_code": "YOUR_CODE"
  }
}
Endpoint: POST https://api.pacifica.fi/api/v1/account/builder_codes/revoke

Useful Endpoints

EndpointDescription
GET /api/v1/trades/history?account=[WALLET]&builder_code=[CODE]User trade history filtered by builder code
GET /api/v1/builder/overview?account=[WALLET]Builder code configuration and specifications
GET /api/v1/builder/trades?builder_code=[CODE]All trades routed through a builder code
GET /api/v1/leaderboard/builder_code?builder_code=[CODE]User leaderboard for a specific builder code

Implementation Notes

  • All JSON keys must be recursively sorted alphabetically before generating the compact JSON string for signing
  • The builder_code field must be placed inside the data object when constructing the payload to be signed
  • All timestamps are in milliseconds
  • The default expiry_window is 30,000 ms (30 seconds) if not specified
  • The builder_code field is optional on all order creation endpoints — existing integrations remain backwards compatible

Error Reference

ErrorCause
403 UnauthorizedUser has not approved the builder code, or their max_fee_rate is lower than the builder’s fee_rate
404 Not FoundThe specified builder code does not exist
400 Bad RequestInvalid builder code format — must be alphanumeric and no more than 16 characters

Register for the Builder Program

Email

Contact ops@pacifica.fi to start the onboarding process.

Discord

Open a support ticket at discord.gg/pacifica.

Telegram

Message @PacificaTGPortalBot on Telegram.

Build docs developers (and LLMs) love