Get all spending limits for an account
curl --request GET \
--url https://grid.squads.xyz/api/grid/v1/accounts/{address}/spending-limits \
--header 'Authorization: Bearer <token>'import requests
url = "https://grid.squads.xyz/api/grid/v1/accounts/{address}/spending-limits"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://grid.squads.xyz/api/grid/v1/accounts/{address}/spending-limits', 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}/spending-limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://grid.squads.xyz/api/grid/v1/accounts/{address}/spending-limits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://grid.squads.xyz/api/grid/v1/accounts/{address}/spending-limits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://grid.squads.xyz/api/grid/v1/accounts/{address}/spending-limits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"address": "<string>",
"amount": 123,
"block_time": "2023-11-07T05:31:56Z",
"destinations": [
"<string>"
],
"environment": "<string>",
"expiration": 123,
"last_modified_signature": "<string>",
"last_reset": 123,
"main_account_address": "<string>",
"mint": "<string>",
"period": 123,
"remaining_amount": 123,
"settings_address": "<string>",
"signers": [
"<string>"
],
"slot": 123,
"status": "<string>"
}
]spending-limits
Get all spending limits for an account
Retrieve all spending limits for a smart account with optional filtering
GET
/
api
/
grid
/
v1
/
accounts
/
{address}
/
spending-limits
Get all spending limits for an account
curl --request GET \
--url https://grid.squads.xyz/api/grid/v1/accounts/{address}/spending-limits \
--header 'Authorization: Bearer <token>'import requests
url = "https://grid.squads.xyz/api/grid/v1/accounts/{address}/spending-limits"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://grid.squads.xyz/api/grid/v1/accounts/{address}/spending-limits', 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}/spending-limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://grid.squads.xyz/api/grid/v1/accounts/{address}/spending-limits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://grid.squads.xyz/api/grid/v1/accounts/{address}/spending-limits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://grid.squads.xyz/api/grid/v1/accounts/{address}/spending-limits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"address": "<string>",
"amount": 123,
"block_time": "2023-11-07T05:31:56Z",
"destinations": [
"<string>"
],
"environment": "<string>",
"expiration": 123,
"last_modified_signature": "<string>",
"last_reset": 123,
"main_account_address": "<string>",
"mint": "<string>",
"period": 123,
"remaining_amount": 123,
"settings_address": "<string>",
"signers": [
"<string>"
],
"slot": 123,
"status": "<string>"
}
]Authorizations
Your Grid API key from the Grid Dashboard
Path Parameters
Smart account address
Query Parameters
Filter by currency
Filter by creation date (ISO format)
Limit the number of results
Required range:
x >= 0Pagination cursor
Response
Spending limits retrieved successfully
Was this page helpful?