Tokens List
curl --request GET \
--url https://app.magna.so/api/external/v1/tokens \
--header 'x-magna-api-token: <api-key>'import requests
url = "https://app.magna.so/api/external/v1/tokens"
headers = {"x-magna-api-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-magna-api-token': '<api-key>'}};
fetch('https://app.magna.so/api/external/v1/tokens', 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://app.magna.so/api/external/v1/tokens",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-magna-api-token: <api-key>"
],
]);
$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://app.magna.so/api/external/v1/tokens"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-magna-api-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.magna.so/api/external/v1/tokens")
.header("x-magna-api-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.magna.so/api/external/v1/tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-magna-api-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"isProcessed": true,
"result": {
"items": [
{
"id": "d94ac97e-504a-4e26-b75c-03afae134849",
"address": "0xc1bf91946E8CaF19cad76c7D1A00c6081b85AC98",
"symbol": "MAG",
"totalSupply": "1000000",
"decimals": 18,
"chain": "Ethereum Sepolia",
"createdAt": "2024-02-16T17:24:20.000Z",
"updatedAt": "2024-02-16T17:48:51.000Z"
}
],
"total": 1
}
}Tokens
Tokens List
List all tokens for the project associated with your API token.
GET
/
api
/
external
/
v1
/
tokens
Tokens List
curl --request GET \
--url https://app.magna.so/api/external/v1/tokens \
--header 'x-magna-api-token: <api-key>'import requests
url = "https://app.magna.so/api/external/v1/tokens"
headers = {"x-magna-api-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-magna-api-token': '<api-key>'}};
fetch('https://app.magna.so/api/external/v1/tokens', 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://app.magna.so/api/external/v1/tokens",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-magna-api-token: <api-key>"
],
]);
$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://app.magna.so/api/external/v1/tokens"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-magna-api-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.magna.so/api/external/v1/tokens")
.header("x-magna-api-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.magna.so/api/external/v1/tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-magna-api-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"isProcessed": true,
"result": {
"items": [
{
"id": "d94ac97e-504a-4e26-b75c-03afae134849",
"address": "0xc1bf91946E8CaF19cad76c7D1A00c6081b85AC98",
"symbol": "MAG",
"totalSupply": "1000000",
"decimals": 18,
"chain": "Ethereum Sepolia",
"createdAt": "2024-02-16T17:24:20.000Z",
"updatedAt": "2024-02-16T17:48:51.000Z"
}
],
"total": 1
}
}⌘I