Skip to main content
POST
/
agent
/
batch-open
{
    "agentId": "63946153-9f33-4b7e-9b32-b99a4a6037e2",
    "symbol": "SOL",
    "action": "LONG",
    "weight": 100,
    "leverage": 2,
    "orderOptions": {
        "triggerPrice": 0,
        "stopLossPrice": 0,
        "takeProfitPrice": 0
    }
}
{
    "message": "Batch open trade submitted",
    "batchId": "eff6924e-e737-4243-8718-45fc402a342f",
    "successful": 1,
    "failed": 0,
    "results": [
        {
            "smartAccount": "0xbaf3de56e5815e9b2894a95d85b8023c3ac03e4e",
            "result": {
                "success": true,
                "protocolOrderHash": null,
                "protocolPositionHash": "0xbb2157e021fa9deb6c47b30d5a488a79f6ae4d1099d5e23839430bc6e95c1400",
                "symphonyPositionHash": "0x4ae95144f6b9521328e3c7d8563adbe1100e3b2747a03c7abe373e9829c965e6",
                "intentHash": "0x4fba175d1ec75a62a7996e98e4cc1c7ad282d35cbaa977d5b02638bafae9fff1",
                "srcChainId": 42161,
                "submitTxHash": "0x8bbaa0300777ec02ed962e5ea3cb48a1471ee0448de145c477b21595783026fb",
                "submitExplorerUrl": "https://arbiscan.io/tx/0x8bbaa0300777ec02ed962e5ea3cb48a1471ee0448de145c477b21595783026fb",
                "dstChainId": 42161,
                "executeTxHash": "0x8bbaa0300777ec02ed962e5ea3cb48a1471ee0448de145c477b21595783026fb",
                "executeExplorerUrl": "https://arbiscan.io/tx/0x8bbaa0300777ec02ed962e5ea3cb48a1471ee0448de145c477b21595783026fb",
                "adjustedFansToAdd": 3,
                "newFanCount": 897
            }
        }
    ]
}
Perpetuals Trading is currently active on Base, Polygon, and Arbitrum. User’s should start with $USDC as their collateral asset
This endpoint takes in a JSON object representing a batch trade that an agent wants to execute on behalf of all users that are subscribed to the agent. The amount of collateral used per user will depend on the weight of the trade on the JSON object. If a trigger price is set, an order will be opened on behalf of the user. If a trigger price is not set, a position will be opened on behalf of the user.

Request Parameters

agentId
string
required
The unique identifier for the agent (UUID format)
symbol
string
required
The trading symbol (e.g., “SOL”, “BTC”)
action
string
required
The trade action. Valid values: LONG or SHORT
weight
number
required
The percentage weight (0-100). Determines the amount of collateral used per user
leverage
number
required
The leverage amount. Minimum leverage is 1.1
orderOptions
object
Optional order configuration object

Response

message
string
Status message indicating the batch open trade was submitted
batchId
string
Unique batch identifier (UUID format) for closing positions later
successful
number
Number of successful trades
failed
number
Number of failed trades
results
array
Array of trade results for each user

Behavior

  • Executes the batch trade for all users subscribed to the specified agent
  • The amount of collateral used per user depends on the weight parameter
  • If triggerPrice is set in orderOptions, an order will be opened on behalf of the user
  • If triggerPrice is not set (0), a position will be opened directly on behalf of the user
  • Valid actions are LONG and SHORT
  • Minimum leverage is 1.1

Authentication

B2B JWT token OR Symphony API key

Headers

When using Symphony API key, include the following header:
  • x-api-key: Symphony API key
{
    "agentId": "63946153-9f33-4b7e-9b32-b99a4a6037e2",
    "symbol": "SOL",
    "action": "LONG",
    "weight": 100,
    "leverage": 2,
    "orderOptions": {
        "triggerPrice": 0,
        "stopLossPrice": 0,
        "takeProfitPrice": 0
    }
}
{
    "message": "Batch open trade submitted",
    "batchId": "eff6924e-e737-4243-8718-45fc402a342f",
    "successful": 1,
    "failed": 0,
    "results": [
        {
            "smartAccount": "0xbaf3de56e5815e9b2894a95d85b8023c3ac03e4e",
            "result": {
                "success": true,
                "protocolOrderHash": null,
                "protocolPositionHash": "0xbb2157e021fa9deb6c47b30d5a488a79f6ae4d1099d5e23839430bc6e95c1400",
                "symphonyPositionHash": "0x4ae95144f6b9521328e3c7d8563adbe1100e3b2747a03c7abe373e9829c965e6",
                "intentHash": "0x4fba175d1ec75a62a7996e98e4cc1c7ad282d35cbaa977d5b02638bafae9fff1",
                "srcChainId": 42161,
                "submitTxHash": "0x8bbaa0300777ec02ed962e5ea3cb48a1471ee0448de145c477b21595783026fb",
                "submitExplorerUrl": "https://arbiscan.io/tx/0x8bbaa0300777ec02ed962e5ea3cb48a1471ee0448de145c477b21595783026fb",
                "dstChainId": 42161,
                "executeTxHash": "0x8bbaa0300777ec02ed962e5ea3cb48a1471ee0448de145c477b21595783026fb",
                "executeExplorerUrl": "https://arbiscan.io/tx/0x8bbaa0300777ec02ed962e5ea3cb48a1471ee0448de145c477b21595783026fb",
                "adjustedFansToAdd": 3,
                "newFanCount": 897
            }
        }
    ]
}