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>"
]
}Standing Orders
Create Standing Order
Create a new recurring standing order
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
Your Grid API key from the Grid Dashboard
Headers
Solana network environment (sandbox, devnet, mainnet)
Idempotency key to prevent duplicate operations
Path Parameters
Smart account address
Body
application/json
Response
Standing order created successfully
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Show child attributes
Show child attributes
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Was this page helpful?
⌘I