Pacifica
  • Getting Started
    • Closed Alpha Guide
      • Link To Guide PDF
    • Closed Alpha Trading Competition
  • Trading on Pacifica
    • Overview
    • Contract Specifications
      • Oracle Price & Mark Price
      • Settlement Mechanism
    • Order Types
      • Market Order
      • Limit Order
      • Order Rules & Constraints
    • Margin & Leverage
    • Funding Rates
    • Liquidations
  • API Documentation
    • API
      • REST
        • Account
        • Agent
        • Funding
        • Info
        • Kline
        • Orders
        • Portfolio
        • Positions
        • Models
      • Websocket
        • Orderbook
        • Trades
        • Orders
        • Positions
        • User Order History
        • User Trade History
        • Candle
        • Account Data
    • Specification
  • Other
    • Brand Assets
    • Contact Us
    • Glossary of Terms
Powered by GitBook
On this page
  1. API Documentation
  2. API
  3. REST

Account

PreviousRESTNextAgent

Get Account Settings

get

This endpoint allows users to get account settings.

Query parameters
accountstringRequired

User account address

Responses
200
Successfully retrieved account settings
application/json
400
Invalid request parameters
401
Unauthorized access
500
Internal server error
get
GET /api/v1/account/settings?account=text HTTP/1.1
Host: 
Accept: */*
[
  {
    "createdAt": "2025-03-25T16:00:37.600487Z",
    "isolated": true,
    "leverage": 30,
    "symbol": "ETH",
    "updatedAt": "2025-03-25T16:00:38.280350Z"
  }
]
  • GETGet Account Info
  • POSTUpdate the leverage of the account for a given symbol
  • POSTUpdate the margin mode of the account for a given symbol
  • GETGet Account Settings
  • POSTWithdraw

Get Account Info

get

This endpoint allows users to get account info.

Query parameters
accountstringRequired

User account address

Responses
200
Successfully retrieved account information
application/json
400
Invalid request parameters
401
Unauthorized access
500
Internal server error
get
GET /api/v1/account?account=text HTTP/1.1
Host: 
Accept: */*
{
  "balance": "2000.000000",
  "feeLevel": 0
}

Update the leverage of the account for a given symbol

post

This endpoint allows users to change the leverage for a specific trading pair.

Body
agent_walletstring | nullableOptionalExample: AgentWalletAddress123
leverageinteger ยท int32RequiredExample: 10
signaturestringRequiredExample: 5j1Vy9UqYUF2jKD9r2Lv5AoMWHJuW5a1mqVzEhC9SJL5GgbPkGEQKpW3UZmKXr4UMrHMJ5xHQFMJk2wE8J5Vyc
symbolstringRequiredExample: BTC
userstringRequiredExample: Cdoykiss4V6kWydv7Q1EQghNqens9Hpte2iB7qjxNxc6
Responses
200
Leverage updated successfully
application/json
400
Bad request
application/json
500
Internal server error
application/json
post
POST /api/v1/account/leverage HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 224

{
  "agent_wallet": "AgentWalletAddress123",
  "leverage": 10,
  "signature": "5j1Vy9UqYUF2jKD9r2Lv5AoMWHJuW5a1mqVzEhC9SJL5GgbPkGEQKpW3UZmKXr4UMrHMJ5xHQFMJk2wE8J5Vyc",
  "symbol": "BTC",
  "user": "Cdoykiss4V6kWydv7Q1EQghNqens9Hpte2iB7qjxNxc6"
}
{
  "error": "Invalid leverage",
  "success": true
}

Update the margin mode of the account for a given symbol

post

This endpoint allows users to switch between isolated and cross margin modes for a specific trading pair.

Body
agent_walletstring | nullableOptionalExample: AgentWalletAddress123
is_isolatedbooleanRequiredExample: false
signaturestringRequiredExample: 5j1Vy9UqYUF2jKD9r2Lv5AoMWHJuW5a1mqVzEhC9SJL5GgbPkGEQKpW3UZmKXr4UMrHMJ5xHQFMJk2wE8J5Vyc
symbolstringRequiredExample: BTC
userstringRequiredExample: Cdoykiss4V6kWydv7Q1EQghNqens9Hpte2iB7qjxNxc6
Responses
200
Margin mode updated successfully
application/json
400
Bad request
application/json
500
Internal server error
application/json
post
POST /api/v1/account/margin HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 230

{
  "agent_wallet": "AgentWalletAddress123",
  "is_isolated": false,
  "signature": "5j1Vy9UqYUF2jKD9r2Lv5AoMWHJuW5a1mqVzEhC9SJL5GgbPkGEQKpW3UZmKXr4UMrHMJ5xHQFMJk2wE8J5Vyc",
  "symbol": "BTC",
  "user": "Cdoykiss4V6kWydv7Q1EQghNqens9Hpte2iB7qjxNxc6"
}
{
  "error": "Invalid margin mode",
  "success": true
}

Withdraw

post

This endpoint allows users to withdraw.

Body
agent_walletstring | nullableOptionalExample: AgentWalletAddress123
amountstringRequiredExample: 100.0
signaturestringRequiredExample: 5j1Vy9UqYUF2jKD9r2Lv5AoMWHJuW5a1mqVzEhC9SJL5GgbPkGEQKpW3UZmKXr4UMrHMJ5xHQFMJk2wE8J5Vyc
userstringRequiredExample: Cdoykiss4V6kWydv7Q1EQghNqens9Hpte2iB7qjxNxc6
Responses
200
Success
400
Invalid request
401
Unauthorized
500
Internal server error
post
POST /api/v1/account/withdraw HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 212

{
  "agent_wallet": "AgentWalletAddress123",
  "amount": "100.0",
  "signature": "5j1Vy9UqYUF2jKD9r2Lv5AoMWHJuW5a1mqVzEhC9SJL5GgbPkGEQKpW3UZmKXr4UMrHMJ5xHQFMJk2wE8J5Vyc",
  "user": "Cdoykiss4V6kWydv7Q1EQghNqens9Hpte2iB7qjxNxc6"
}

No content