Skip to main content
POST
/
accounts
/
{address}
/
smart-transactions
cURL
curl --request POST \
  --url https://grid.squads.xyz/api/grid/v1/accounts/{address}/smart-transactions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-grid-environment: <x-grid-environment>' \
  --data '
{
  "policies": {
    "signers": [
      {
        "address": "<string>",
        "permissions": [
          "CAN_INITIATE"
        ]
      }
    ],
    "threshold": 1,
    "expiration_args": "<unknown>",
    "start_timestamp": 123
  },
  "rules": {
    "allowed_inputs": [
      {
        "mint": "<string>",
        "allowance": "<unknown>"
      }
    ],
    "allowed_outputs": [
      "<string>"
    ],
    "fees_bps": 1,
    "max_slippage_bps": 1,
    "venue": "<unknown>"
  },
  "transactionSigners": [
    "<string>"
  ]
}
'
{
  "data": {
    "smartTransactionAddress": "<string>",
    "transaction": "<string>",
    "kmsPayloads": [
      {
        "address": "<string>",
        "payload": "<string>",
        "provider": "privy"
      }
    ],
    "transactionSigners": [
      "<string>"
    ]
  },
  "metadata": {
    "request_id": "<string>",
    "timestamp": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Your Grid API key from the Grid Dashboard

Headers

x-grid-environment
string
required

Target Solana environment

Path Parameters

address
string
required

Smart account address (Solana public key)

Body

application/json

Request payload for creating a trade smart transaction (policy).

policies
object
required
rules
object
required
transactionSigners
string[]

Signers for the transaction that creates this policy

Response

Smart transaction created successfully

data
object
required
metadata
object
required