Skip to main content
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

Authorization
string
header
required

Your Grid API key from the Grid Dashboard

Path Parameters

address
string
required

Smart account address

Query Parameters

currency
string

Filter by currency

creation_date
string

Filter by creation date (ISO format)

limit
integer<int32>

Limit the number of results

Required range: x >= 0
cursor
string

Pagination cursor

Response

Spending limits retrieved successfully

address
string
required
amount
integer<int64>
required
block_time
string<date-time>
required
destinations
string[]
required
environment
string
required
expiration
integer<int64>
required
last_modified_signature
string
required
last_reset
integer<int64>
required
main_account_address
string
required
mint
string
required
period
integer<int32>
required
remaining_amount
integer<int64>
required
settings_address
string
required
signers
string[]
required
slot
integer<int32>
required
status
string
required