Resources may generate actions which are then stored on the Pocket Cloud. These actions may result in orders being sent to financial exchanges which in turn may become transactions, affecting the user’s running ledger (if not in sandbox mode).
For example, the below user resource may generate the below action, resulting in two orders with an accompanying transaction and a linked resource reward.
Use SSE to receive up-to-date information from your resources
All of the below endpoints alternatively support the SSE protocol. You may open a long-lived session to the Pocket Cloud by passing the Accept: text/event-stream header to your HTTPs request. All other parameters remain the same.
Inspect resource records
Dependent on the type of resource, resources may output records from one or more actions. Records contain a historical record of the information a resource used to take an action. These actions can be inspected by querying the /object/record endpoint.
When a resource takes an action, those actions are recorded under the record endpoint. For example, the above response yields actions for the SNAP ticker destined for the NYSE American exchange. These records may result in orders (below).
Inspect resource orders
Once a resource generates an action, that action may become one or more orders . Orders are submitted to either an explicitly defined exchange or an optimally chosen one. These actions may be inspected by querying the /object/order endpoint.
Resource actions will affect your portfolio and account state. Let’s inspect our linked account ledger to determine what all has occurred.
Inspect ledger state
Accounts and portfolios are linked to ledgers , a running financial statement of your resource’s actions. In free and personal mode, each account has one running ledger.
1
@TODO
1
@TODO
You should see one of the below:
1
@TODO
1
@TODO
1
"You do not have access to this API"
1
"Could not find account - `account_id` not found"
👍 Meravellós! You’ve checked-in on the state of your AI on the Pocket Cloud!