We’re setting aside up to a total of 10,000,000 points to reward teams building on Pacifica’s Builder Program. Builder Program Rewards will be distributed based on each team’s contribution to Pacifica’s growth. To ensure fairness and meaningful impact within the ecosystem, an evaluation process will be conducted. Only teams that make significant contributions to Pacifica’s development will be eligible to receive point rewards.
Step 1: Request User Authorization
Request the user to authorize placing orders with your builder code by prompting them to sign an approval request containing your builder code asbuilder_code and the additional fee rate you want to charge as max_fee_rate.
Important: The user’s max_fee_rate must be greater than or equal to your builder’s fee_rate. If they set a lower value, orders will be rejected.
Data to be Signed
To approve a builder code, the user signs:
POST https://api.pacifica.fi/api/v1/account/builder_codes/approve
Check User Approvals (Optional)
You can query which builder codes a user has approved:
Endpoint: GET https://api.pacifica.fi/api/v1/account/builder_codes/approvals?account=6ETn....
Response:
POST https://api.pacifica.fi/api/v1/account/builder_codes/revokeStep 2: Include Builder Code in Order Creation Requests
All order creation requests may now include your builder code in thebuilder_code parameter. Update the following endpoints:
REST API:
POST /api/v1/orders/create_marketPOST /api/v1/orders/createPOST /api/v1/orders/stop/createPOST /api/v1/positions/tpsl
create_market_ordercreate_limit_ordercreate_stop_orderset_position_tpsl
POST https://api.pacifica.fi/api/v1/orders/create_market
Example: Create Limit Order with Builder Code
Data to be Signed
POST https://api.pacifica.fi/api/v1/orders/create
Example: Set Position TP/SL with Builder Code
Data to be Signed
POST https://api.pacifica.fi/api/v1/positions/tpsl
Note: builder_code is provided only at the top level for TP/SL creation, not within individual take_profit or stop_loss objects.Implementation Notes
- Signature Generation: Follow the standard signing implementation for all requests
- Builder Code Placement: The
builder_codemust be included in thedataobject when creating the payload to be signed - Recursive Sorting: All JSON keys must be recursively sorted alphabetically before creating the compact JSON string
- Timestamps: All times are in milliseconds
- Expiry Window: Defaults to 30 seconds (30,000 ms) if not specified
- Backwards Compatibility: The
builder_codefield is optional on all order creation endpoints - Validation: Orders with builder codes will be rejected if:
- The builder code doesn’t exist
- The user hasn’t approved the builder code
- The user’s
max_fee_rateis less than the builder’sfee_rate
Update Builder Code Fee Rate
Update the fee rate for your builder code. This endpoint is for builder account owners to change the fee they charge on orders sent with their builder code.Request User Authorization (Sign & Send)
Builder account owner to sign an update containing the builder code and the new fee rate.
Data to be Signed
POST https://api.pacifica.fi/api/v1/builder/update_fee_rate
Referral Code Claim
Users can claim a referral code to establish a referral relationship with the code’s owner.How It Works
Step 1: Request User Authorization Request the user to authorize claiming a referral code by prompting them to sign an approval request containing the referral code. Data to be SignedPOST https://api.pacifica.fi/api/v1/referral/user/code/claim
Useful Endpoints
- User trade history via specific builder code:
https://api.pacifica.fi/api/v1/trades/history?account=[WALLET_ADDRESS]&builder_code=[BUILDER_CODE] - Builder Code Specifications:
https://api.pacifica.fi/api/v1/builder/overview?account=[WALLET_ADDRESS] - Builder Trade History:
https://api.pacifica.fi/api/v1/builder/trades?builder_code=[BUILDER_CODE] - Builder Code User Leaderboard:
https://api.pacifica.fi/api/v1/leaderboard/builder_code?builder_code=[BUILDER_CODE]
Error Handling
Common Error Codes:403 Unauthorized: User hasn’t approved the builder code ormax_fee_rateis too low404 Not Found: Builder code doesn’t exist400 Bad Request: Invalid builder code format (must be alphanumeric, max 16 characters)