Skip to content

Get Transfers

Retrieve transfer history for a subaccount, including collateral transfers between subaccounts. Supports filtering by collateral symbol and time range, with pagination.

Endpoint

POST https://papi.synthetix.io/v1/trade

Request

Request Format

{
  "params": {
    "action": "getTransfers",
    "subAccountId": "1867542890123456789",
    "symbol": "USDT",
    "limit": 50,
    "offset": 0,
    "startTime": 1740220800000,
    "endTime": 1740307200000
  },
  "expiresAfter": 1704153600,
  "signature": {
    "v": 28,
    "r": "0x19480589384695193600abcdef19480589384695193600abcdef19480589384695193600abcdef19480589384695193600abcdef",
    "s": "0xabcdef19480589384695193600abcdef19480589384695193600abcdef19480589384695193600abcdef19480589384695193600"
  }
}

Request Parameters

ParameterTypeRequiredDescription
paramsobjectYesRequest parameters wrapper
params.actionstringYesMust be "getTransfers"
params.subAccountIdstringYesSubAccount ID to retrieve transfers for
params.symbolstringNoFilter by collateral symbol (e.g., "USDT", "WETH")
params.limitintegerNoMaximum number of results to return (default: 50, max: 1000)
params.offsetintegerNoPagination offset (default: 0)
params.startTimenumberNoStart timestamp in milliseconds. Must be within the last 30 days; values older than 30 days are rejected. When omitted, the query window begins 30 days before the request time.
params.endTimenumberNoEnd timestamp in milliseconds. Maximum range between startTime and endTime: 30 days. When startTime is omitted, endTime must also fall within the last 30 days.
ParameterTypeRequiredDescription
nonceuint64Yes*Positive integer nonce (must be incrementing and unique per request)
signatureobjectYesEIP-712 signature object
expiresAfteruint64NoUnix milliseconds expiration timestamp (5x rate limit on stale cancels)

:::info Common Parameters These are top-level request parameters. The subAccountId parameter is specified within the params object (see each endpoint's parameter table). :::

:::info SubAccountAction Endpoints Endpoints using SubAccountAction signing (getPositions, getOpenOrders, getOrdersHistory, getTrades, getFundingPayments, getSubAccount, getSubAccounts, getDelegatedSigners, getBalanceUpdates) do not require the nonce parameter. Only signature and optional expiresAfter are needed. :::

Response

Response Structure

FieldTypeDescription
statusstringAlways "ok" for successful requests or "error" for failures
responseobjectResponse object containing transfers (omitted when status is "error")
errorobjectError details (only present when status is "error")
request_idstringRequest tracking identifier

Success Response

{
  "status": "ok",
  "response": {
    "transfers": [
      {
        "transferId": "12345",
        "from": "2011391943438766080",
        "to": "3022502054549877191",
        "symbol": "USDT",
        "amount": "100",
        "transferType": "COLLATERAL_TRANSFER",
        "status": "success",
        "timestamp": 1740307200000
      },
      {
        "transferId": "12346",
        "from": "2011391943438766080",
        "to": "3022502054549877191",
        "symbol": "WETH",
        "amount": "0.5",
        "transferType": "COLLATERAL_TRANSFER",
        "status": "success",
        "timestamp": 1740220800000
      }
    ],
    "total": 2
  },
  "request_id": "5ccf215d37e3ae6d"
}

Empty Result

{
  "status": "ok",
  "response": {
    "transfers": [],
    "total": 0
  },
  "request_id": "5ccf215d37e3ae6f"
}

Transfer Object

FieldTypeDescription
transferIdstringUnique transfer identifier (string for JS BigInt compatibility)
fromstringSource subaccount ID
tostringDestination subaccount ID
symbolstringCollateral symbol (e.g., "USDT", "WETH")
amountstringTransfer amount as a decimal string
transferTypestringTransfer type (e.g., "COLLATERAL_TRANSFER")
statusstringTransfer status (e.g., "success", "pending", "failed")
errorMessagestringError details when the transfer failed (omitted when empty)
timestampnumberUnix timestamp in milliseconds when the transfer occurred

Error Response

{
  "status": "error",
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "subAccountId is required"
  },
  "request_id": "5ccf215d37e3ae6d"
}

Usage Examples

Get All Transfers

{
  "params": {
    "action": "getTransfers",
    "subAccountId": "1867542890123456789"
  },
  "expiresAfter": 1704153600,
  "signature": { "v": 28, "r": "0x...", "s": "0x..." }
}

Filter by Symbol

{
  "params": {
    "action": "getTransfers",
    "subAccountId": "1867542890123456789",
    "symbol": "USDT"
  },
  "expiresAfter": 1704153600,
  "signature": { "v": 28, "r": "0x...", "s": "0x..." }
}

Filter by Time Range

{
  "params": {
    "action": "getTransfers",
    "subAccountId": "1867542890123456789",
    "startTime": 1740220800000,
    "endTime": 1740307200000
  },
  "expiresAfter": 1704153600,
  "signature": { "v": 28, "r": "0x...", "s": "0x..." }
}

Paginated Request

{
  "params": {
    "action": "getTransfers",
    "subAccountId": "1867542890123456789",
    "limit": 100,
    "offset": 100
  },
  "expiresAfter": 1704153600,
  "signature": { "v": 28, "r": "0x...", "s": "0x..." }
}

EIP-712 Signature

const domain = {
  name: "Synthetix",
  version: "1",
  chainId: 1,
  verifyingContract: "0x0000000000000000000000000000000000000000",
};
 
const types = {
  SubAccountAction: [
    { name: "subAccountId", type: "uint256" },
    { name: "action", type: "string" },
    { name: "expiresAfter", type: "uint256" },
  ],
};
 
const message = {
  subAccountId: "1867542890123456789",
  action: "getTransfers",
  expiresAfter: 0,
};
 
const signature = await signer._signTypedData(domain, types, message);

Implementation Notes

  • Returns transfer history including collateral transfers between subaccounts
  • Results are ordered by timestamp (most recent first)
  • Default limit is 50 results per request, maximum is 1000
  • Maximum time range is 30 days when using startTime and endTime
  • Use pagination with limit and offset for large result sets
  • Authentication requires signature by account owner using SubAccountAction EIP-712 type (no nonce required)
  • The API enforces a 30-day historical data retention limit. Providing a startTime older than 30 days returns a validation error.
  • When startTime is omitted, the query window is automatically anchored to 30 days before the request time. Integrators who previously omitted startTime to retrieve all history will now receive only the most recent 30 days. To access a specific earlier window, provide an explicit startTime within the 30-day retention period.

Signing

All trading methods are signed using EIP-712. Each successful trading request will contain:

  • A piece of structured data that includes the sender address
  • A signature of the hash of that structured data, signed by the sender

For detailed information on EIP-712 signing, see EIP-712 Signing.

Nonce Management

The nonce system prevents replay attacks and ensures order uniqueness:

  • Use any positive integer as nonce
  • Each nonce must be greater than the previous one (incrementing)
  • Date.now() is a convenient option, not a requirement
  • If nonce conflicts occur, increment by 1 and retry

:::note SubAccountAction Exception SubAccountAction endpoints (getPositions, getOpenOrders, getOrdersHistory, getTrades, getFundingPayments, getSubAccount, getSubAccounts, getDelegatedSigners, getBalanceUpdates) do not require a nonce. Only the signature and optional expiresAfter parameters are needed. :::

Error Handling

Common error scenarios:

Error CodeDescriptionRetryable
UNAUTHORIZEDEIP-712 signature validation failedNo
VALIDATION_ERRORRequest validation failedNo
MISSING_REQUIRED_FIELDRequired field is missingNo
INVALID_FORMATField format is invalidNo
INVALID_VALUEInvalid parameter valueNo
RATE_LIMIT_EXCEEDEDToo many requests in time windowYes
INSUFFICIENT_MARGINNot enough margin for tradeNo
ORDER_NOT_FOUNDOrder does not existNo
OPERATION_TIMEOUTOperation timed outYes
Error CodeMessageDescription
VALIDATION_ERRORsubAccountId is requiredNo subaccount ID was provided
VALIDATION_ERRORlimit cannot exceed 1000Limit parameter exceeds maximum
VALIDATION_ERRORlimit must be non-negativeNegative limit value provided
VALIDATION_ERRORoffset must be non-negativeNegative offset value provided
VALIDATION_ERRORinvalid request parametersInvalid time range (exceeds 30 days)
VALIDATION_ERRORstartTime cannot be more than 30 days in the paststartTime is older than the 30-day historical data retention limit
VALIDATION_ERRORendTime is older than the 30-day historical data capendTime is older than 30 days and startTime was not provided
INVALID_FORMATinvalid request formatMalformed request body
INTERNAL_ERRORfailed to get transfersServer error retrieving transfer data

Related Endpoints