curl --request GET \
--url https://api.example.com/api/:projectId/accounts{
"projectId": "<string>",
"programName": "<string>",
"accounts": [
{
"name": "<string>",
"kind": "<string>",
"docs": [
{}
],
"discriminator": [
{}
],
"fields": [
{
"name": "<string>",
"type": "<string>"
}
]
}
]
}List account types and get account schemas from a program IDL
curl --request GET \
--url https://api.example.com/api/:projectId/accounts{
"projectId": "<string>",
"programName": "<string>",
"accounts": [
{
"name": "<string>",
"kind": "<string>",
"docs": [
{}
],
"discriminator": [
{}
],
"fields": [
{
"name": "<string>",
"type": "<string>"
}
]
}
]
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/berkayoztunc/orquestra/llms.txt
Use this file to discover all available pages before exploring further.
GET /api/:projectId/accounts
Show Account Object
curl -X GET "https://api.orquestra.so/api/proj_abc123/accounts"
{
"projectId": "proj_abc123",
"programName": "token_swap",
"accounts": [
{
"name": "Pool",
"kind": "struct",
"docs": [
"Token swap pool account",
"Stores liquidity and swap configuration"
],
"discriminator": [241, 154, 109, 4, 17, 177, 109, 188],
"fields": [
{
"name": "authority",
"type": "publicKey"
},
{
"name": "tokenA",
"type": "publicKey"
},
{
"name": "tokenB",
"type": "publicKey"
},
{
"name": "reserveA",
"type": "u64"
},
{
"name": "reserveB",
"type": "u64"
},
{
"name": "fee",
"type": "u16"
},
{
"name": "minLiquidity",
"type": "u64"
},
{
"name": "maxSlippage",
"type": "u16"
},
{
"name": "paused",
"type": "bool"
},
{
"name": "createdAt",
"type": "i64"
},
{
"name": "updatedAt",
"type": "i64"
}
]
},
{
"name": "UserPosition",
"kind": "struct",
"docs": [
"User liquidity position"
],
"discriminator": [45, 78, 201, 123, 88, 34, 190, 77],
"fields": [
{
"name": "owner",
"type": "publicKey"
},
{
"name": "pool",
"type": "publicKey"
},
{
"name": "liquidity",
"type": "u64"
},
{
"name": "depositedA",
"type": "u64"
},
{
"name": "depositedB",
"type": "u64"
},
{
"name": "lastDepositAt",
"type": "i64"
}
]
},
{
"name": "GlobalConfig",
"kind": "struct",
"docs": [
"Global program configuration"
],
"discriminator": [89, 12, 45, 234, 156, 78, 91, 200],
"fields": [
{
"name": "admin",
"type": "publicKey"
},
{
"name": "treasuryFee",
"type": "u16"
},
{
"name": "treasury",
"type": "publicKey"
},
{
"name": "paused",
"type": "bool"
},
{
"name": "minPoolLiquidity",
"type": "u64"
},
{
"name": "maxPoolCount",
"type": "u32"
}
]
}
]
}
import { AccountInfo } from '@solana/web3.js';
// Pool account discriminator
const POOL_DISCRIMINATOR = [241, 154, 109, 4, 17, 177, 109, 188];
function isPoolAccount(accountInfo: AccountInfo<Buffer>): boolean {
const discriminator = accountInfo.data.slice(0, 8);
return discriminator.equals(Buffer.from(POOL_DISCRIMINATOR));
}
import { Program } from '@project-serum/anchor';
import { Connection, PublicKey } from '@solana/web3.js';
// Fetch and deserialize a Pool account
const connection = new Connection('https://api.mainnet-beta.solana.com');
const poolAddress = new PublicKey('...');
const poolAccount = await program.account.pool.fetch(poolAddress);
console.log('Reserve A:', poolAccount.reserveA.toString());
console.log('Reserve B:', poolAccount.reserveB.toString());
404 Not Found
{
"error": "Project not found or not public"
}
500 Internal Server Error
{
"error": "Failed to get accounts"
}
getProgramAccounts.vec<CustomStruct> will show the full type representation including nested structures.