Skip to content

Individual Stock View

The individual stocks view contains the available operations/options for a given stock.

Terminal window
curl --request POST \
--url https://api.staging.pipevest.com/v1/ussd/process \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <access-token>' \
--header 'x-client-id: <client-id>' \
--data '{"sessionId": "<session-id>", "choice": "1"}'

Example Response

{
"message": "USSD request processed successfully",
"data": {
"sessionId": "ussd_5310deea137a9cd999b02ae68a7bbbec",
"currentState": "SELECT_STOCK",
"menu": {
"state": "SELECT_STOCK",
"text": "Apple Inc. (AAPL)\n\nPrice: ZK6058.00\nChange: $-0.53 (-0.20%)\n\nWhat would you like to do?",
"options": [
{
"key": "1",
"label": "Buy Stock",
"nextState": "BUY_STOCK"
},
{
"key": "2",
"label": "More Details",
"nextState": "MORE_STOCK_DETAIL"
},
{
"key": "0",
"label": "Back to Stocks",
"nextState": "STOCKS"
}
],
"isEndState": false
},
"ussdText": "Apple Inc. (AAPL)\n\nPrice: ZK6058.00\nChange: $-0.53 (-0.20%)\n\nWhat would you like to do?\n\n1. Buy Stock\n2. More Details\n0. Back to Stocks",
"expiresAt": "2025-11-06T14:58:33.942Z"
}
}
What the customer sees
Apple Inc. (AAPL)

Price: ZK6058.00
Change: $-0.53 (-0.20%)

What would you like to do?

1. Buy Stock
2. More Details
0. Back to Stocks
USSD Individual Stock View

Check out an example of the ussd individual stock view