Documentation Index Fetch the complete documentation index at: https://docs.pipevest.com/llms.txt
Use this file to discover all available pages before exploring further.
The stocks menu view contains the available stocks that can be purchased.
Accessing the stocks view
This is the menu that is displayed once the customer has chosen to view stocks.
From here the customer can choose to view an individual stock or search for a stock.
Example Response
{
"message" : "USSD request processed successfully" ,
"data" : {
"sessionId" : "ussd_5310deea137a9cd999b02ae68a7bbbec" ,
"currentState" : "STOCKS" ,
"menu" : {
"state" : "STOCKS" ,
"text" : "Select Stock:" ,
"options" : [
{
"key" : "1" ,
"label" : "AAPL" ,
"nextState" : "SELECT_STOCK" ,
"data" : {
"stockId" : "cmhkp4jkw0005zxfok9m0kiwg" ,
"symbol" : "AAPL" ,
"name" : "Apple Inc."
}
},
...
{
"key" : "7" ,
"label" : "Next Page"
},
{
"key" : "8" ,
"label" : "Search Stock" ,
"nextState" : "SEARCH_STOCK"
},
{
"key" : "0" ,
"label" : "Back to Home" ,
"nextState" : "HOME"
}
],
"isEndState" : false
},
"ussdText" : "Select Stock: \n\n 1. AAPL \n 2. AMZN \n 3. GOOGL \n 4. JPM \n 5. META \n 7. Next Page \n 8. Search Stock \n 0. Back to Home" ,
"expiresAt" : "2025-11-06T14:58:33.942Z"
}
}
Viewing individual stock
Paging stocks view
curl --request POST \
--url https://api.staging.pipevest.com/v1/ussd/process
...
--data 'sessionId=<session-id>'
--data 'choice=7'
Searching for a stock
Returns a view that allows users to input a stock symbol.
curl --request POST \
--url https://api.staging.pipevest.com/v1/ussd/process
...
--data 'sessionId=<session-id>'
--data 'choice=8'
Example Response
{
"message" : "USSD request processed successfully" ,
"data" : {
"sessionId" : "ussd_5310deea137a9cd999b02ae68a7bbbec" ,
"currentState" : "SEARCH_STOCK" ,
"menu" : {
"state" : "SEARCH_STOCK" ,
"text" : "Enter stock symbol or name: \n (e.g., AAPL or Apple)" ,
"options" : [
{
"key" : "0" ,
"label" : "Cancel" ,
"nextState" : "STOCKS"
}
],
"isEndState" : false
},
"ussdText" : "Enter stock symbol or name: \n (e.g., AAPL or Apple) \n\n 0. Cancel" ,
"expiresAt" : "2025-11-06T14:58:33.942Z"
}
}
Processing stock search
Pass the stock symbol or name to the choice parameter.
curl --request POST \
--url https://api.staging.pipevest.com/v1/ussd/process
...
--data 'sessionId=<session-id>'
--data 'choice=Tesla'
Example Response
{
"message" : "USSD request processed successfully" ,
"data" : {
"sessionId" : "ussd_5310deea137a9cd999b02ae68a7bbbec" ,
"currentState" : "STOCKS" ,
"menu" : {
"state" : "STOCKS" ,
"text" : "Select Stock:" ,
"options" : [
{
"key" : "1" ,
"label" : "TSLA" ,
"nextState" : "SELECT_STOCK" ,
"data" : {
"stockId" : "cmhkp4km20009zxfoyv85kkij" ,
"symbol" : "TSLA" ,
"name" : "Tesla Inc."
}
},
{
"key" : "8" ,
"label" : "Search Stock" ,
"nextState" : "SEARCH_STOCK"
},
{
"key" : "0" ,
"label" : "Back to Home" ,
"nextState" : "HOME"
}
],
"isEndState" : false
},
"ussdText" : "Select Stock: \n\n 1. TSLA \n 8. Search Stock \n 0. Back to Home" ,
"expiresAt" : "2025-11-06T14:58:33.942Z"
}
}
Stocks View Example
USSD Stocks View Check out an example of the ussd stock view