Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

lastcall/v2 package

Overview

Package lastcall is a synthetic stocks desk on gno.land.

It is self-contained: it runs its own price feed (an off-chain bot pushes quotes from the desk key, trusted by caller address), issues a test-USD collateral token and synthetic stock tokens, and lets users trade them spot against the desk. There is no external oracle and no external liquidity — the desk is always the counterparty at its own quoted price.

All amounts are integers. USD values are micro-USD (6 decimals): $190.42 -> 190420000. Token amounts use 6 decimals too, so one whole share is 1_000000 units and lines up 1:1 with the price scale.

Function

PerpsOf

func PerpsOf(owner address) string
Ask AI Claude ChatGPT

PerpsOf returns the caller's open positions, one per line, fields comma- separated: id,ticker,L|S,size,entry,margin,mark,pnl,liq,stopLoss,takeProfit. Money and size are integers at 6 dp; mark/pnl/liq are computed live. Stop prices are 0 when unset. Empty string if none.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1p8v5lkq5mqp7r8h8stcv4fgrwrx3zupvww9m85/lastcall/v2.PerpsOf()"

Result

Gno Expression Evaluator

Evaluate any read-only Gno expression against gno.land/r/g1p8v5lkq5mqp7r8h8stcv4fgrwrx3zupvww9m85/lastcall/v2, for example a function call with arguments.