Forkast Developer Docs
...
Services
Balance
6 min
this section documents the core interfaces used when working with user balances in forkastsdk functions get balance import { balanceresponse } from '@forkastgg/client'; const balance balanceresponse = await this balancesservice() getbalances(accesstoken); parameters field type required description accesstoken string yes access token received from login response types balance represents a user's wallet and proxy wallet balances across different stablecoins and platform tokens interface balanceresponse { id string; createdat string; updatedat string; deletedat string; userid number; balanceusdc string; lockbalanceusdc string; balanceusdt string; lockbalanceusdt string; balancecgpc string; lockbalancecgpc string; walletproxyaddress string; walletaddress string; } key fields field type description id string createdat string iso timestamp of when the balance record was created uppdatedat string iso timestamp of last update deletedat string iso timestamp if the record is soft deleted userid number id of the user balanceusdc number 1 = yes outcome 0 = no outcome lockbalanceusdc number price per unit of outcome token balancecgpc number number of shares to buy/sell lockbalancecgpc number total value (price amount) export interface orderbook { asks array<{ price number; size number }>; bids array<{ price number; size number }>; } // example / { "asks" \[{ "price" 0 75, "size" 100 }], "bids" \[{ "price" 0 68, "size" 80 }] } / key fields field description asks sell offers with price and available shares bids buy offers with price and available shares these types can be imported from the forkast sdk import { marketoutcome, marketposition, marketstatus } from "@forkastgg/client";