Railnet provides a GraphQL API for querying portfolio data, positions, transaction history, and protocol state. Use this API to build dashboards, generate reports, and monitor your Multi-Vehicle operations.
GraphQL endpoint
https://query.railnet-testnet.defi.testnet.kiln.fi/v1/graphql
This is the testnet endpoint. The mainnet endpoint will be provided when available.
Available data
The GraphQL API exposes data indexed from on-chain events, including:
Multi-Vehicle positions — current allocations across sub-vehicles
Query lifecycle — track deposit and redeem queries through STEAM states
Fee accrual — accumulated fees and distribution history
Sector accounting — asset balances across sectors
Keeper jobs — automation status and execution history
Example queries
Query Multi-Vehicle positions
query GetMultiVehiclePositions ( $address : String ! ) {
multiVehicle ( where : { address : { _eq : $address } }) {
address
totalAssets
totalSupply
vehicles {
vehicleAddress
totalAssets
sector
}
}
}
Query STEAM query state
query GetQueryState ( $queryId : String ! ) {
steamQuery ( where : { id : { _eq : $queryId } }) {
id
state
mode
owner
receiver
inputAssets {
asset
value
}
outputAssets {
asset
value
}
createdAt
updatedAt
}
}
Query keeper job status
query GetKeeperJobs ( $multiVehicle : String ! ) {
keeperJobs ( where : { target : { _eq : $multiVehicle } }) {
jobId
status
lastExecutedAt
executionCount
}
}
Full schema documentation is coming soon. Use GraphQL introspection to explore available types and fields: {
__schema {
types {
name
fields {
name
type { name }
}
}
}
}
Integration patterns
Polling
Query the API at regular intervals to update your platform’s view of positions and state.
const ENDPOINT = "https://query.railnet-testnet.defi.testnet.kiln.fi/v1/graphql" ;
async function getPositions ( multiVehicleAddress : string ) {
const response = await fetch ( ENDPOINT , {
method: "POST" ,
headers: { "Content-Type" : "application/json" },
body: JSON . stringify ({
query: `
query ($address: String!) {
multiVehicle(where: { address: { _eq: $address } }) {
totalAssets
totalSupply
vehicles { vehicleAddress totalAssets }
}
}
` ,
variables: { address: multiVehicleAddress }
})
});
return response . json ();
}
Subscriptions
The GraphQL API supports subscriptions for real-time updates on query state changes and other events.
subscription OnQueryUpdate ( $owner : String ! ) {
steamQuery ( where : { owner : { _eq : $owner } }) {
id
state
updatedAt
}
}
Next steps
Handle deposits and withdrawals Process operations through the STEAM lifecycle.
Set up access control Configure roles and permissions.