Skip to main content
POST
/
api
/
grid
/
v1
/
accounts
/
{address}
/
standing-order-intent
Create a standing order intent
curl --request POST \
  --url https://grid.squads.xyz/api/grid/v1/accounts/{address}/standing-order-intent \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-grid-environment: <x-grid-environment>' \
  --data '
{
  "amount": "<string>",
  "destination": {
    "currency": "<string>",
    "details": "<unknown>",
    "payment_rail": "<string>"
  },
  "frequency": "<string>",
  "source": {
    "currency": "<string>",
    "details": "<unknown>",
    "payment_rail": "<string>"
  },
  "start_date": "2023-11-07T05:31:56Z",
  "end_date": "2023-11-07T05:31:56Z"
}
'
import requests

url = "https://grid.squads.xyz/api/grid/v1/accounts/{address}/standing-order-intent"

payload = {
"amount": "<string>",
"destination": {
"currency": "<string>",
"details": "<unknown>",
"payment_rail": "<string>"
},
"frequency": "<string>",
"source": {
"currency": "<string>",
"details": "<unknown>",
"payment_rail": "<string>"
},
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z"
}
headers = {
"x-grid-environment": "<x-grid-environment>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {
'x-grid-environment': '<x-grid-environment>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: '<string>',
destination: {currency: '<string>', details: '<unknown>', payment_rail: '<string>'},
frequency: '<string>',
source: {currency: '<string>', details: '<unknown>', payment_rail: '<string>'},
start_date: '2023-11-07T05:31:56Z',
end_date: '2023-11-07T05:31:56Z'
})
};

fetch('https://grid.squads.xyz/api/grid/v1/accounts/{address}/standing-order-intent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://grid.squads.xyz/api/grid/v1/accounts/{address}/standing-order-intent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '<string>',
'destination' => [
'currency' => '<string>',
'details' => '<unknown>',
'payment_rail' => '<string>'
],
'frequency' => '<string>',
'source' => [
'currency' => '<string>',
'details' => '<unknown>',
'payment_rail' => '<string>'
],
'start_date' => '2023-11-07T05:31:56Z',
'end_date' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-grid-environment: <x-grid-environment>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://grid.squads.xyz/api/grid/v1/accounts/{address}/standing-order-intent"

payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"destination\": {\n \"currency\": \"<string>\",\n \"details\": \"<unknown>\",\n \"payment_rail\": \"<string>\"\n },\n \"frequency\": \"<string>\",\n \"source\": {\n \"currency\": \"<string>\",\n \"details\": \"<unknown>\",\n \"payment_rail\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-grid-environment", "<x-grid-environment>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://grid.squads.xyz/api/grid/v1/accounts/{address}/standing-order-intent")
.header("x-grid-environment", "<x-grid-environment>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"destination\": {\n \"currency\": \"<string>\",\n \"details\": \"<unknown>\",\n \"payment_rail\": \"<string>\"\n },\n \"frequency\": \"<string>\",\n \"source\": {\n \"currency\": \"<string>\",\n \"details\": \"<unknown>\",\n \"payment_rail\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://grid.squads.xyz/api/grid/v1/accounts/{address}/standing-order-intent")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-grid-environment"] = '<x-grid-environment>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"<string>\",\n \"destination\": {\n \"currency\": \"<string>\",\n \"details\": \"<unknown>\",\n \"payment_rail\": \"<string>\"\n },\n \"frequency\": \"<string>\",\n \"source\": {\n \"currency\": \"<string>\",\n \"details\": \"<unknown>\",\n \"payment_rail\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\"\n}"

response = http.request(request)
puts response.read_body
{
  "amount": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "currency": "<string>",
  "destination": {
    "currency": "<string>",
    "details": "<unknown>",
    "payment_rail": "<string>"
  },
  "frequency": "<string>",
  "id": "<string>",
  "kms_payloads": [
    {
      "address": "<string>",
      "payload": "<string>"
    }
  ],
  "payment_rail": "<string>",
  "source": {
    "currency": "<string>",
    "details": "<unknown>",
    "payment_rail": "<string>"
  },
  "start_date": "2023-11-07T05:31:56Z",
  "status": "<string>",
  "transaction": "<string>",
  "ui_amount": "<string>",
  "valid_until": "2023-11-07T05:31:56Z",
  "end_date": "2023-11-07T05:31:56Z",
  "transaction_signers": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

Your Grid API key from the Grid Dashboard

Headers

x-grid-environment
string
required

Solana network environment (sandbox, devnet, mainnet)

x-idempotency-key
string | null

Idempotency key to prevent duplicate operations

Path Parameters

address
string
required

Smart account address

Body

application/json
amount
string
required
destination
object
required
frequency
string
required
source
object
required
start_date
string<date-time>
required
end_date
string<date-time> | null

Response

Standing order created successfully

amount
string
required
created_at
string<date-time>
required
currency
string
required
destination
object
required
frequency
string
required
id
string
required
kms_payloads
object[]
required
payment_rail
string
required
source
object
required
start_date
string<date-time>
required
status
string
required
transaction
string
required
ui_amount
string
required
valid_until
string<date-time>
required
end_date
string<date-time> | null
transaction_signers
string[]