Topup ApiStock
Add Stock
Add stock to user inventory using Redis Sorted Sets This endpoint adds new stock codes to both: 1. PostgreSQL (full metadata storage) 2. Redis Sorted Sets (for atomic operations) The stock is stored in Redis using key pattern `stock:${ownerId}:${game}:${groupId}` with stock IDs as both score and member in the sorted set. Codes must be unique and not already in the user's inventory. Code formats are validated before storage.
POST
/
stock
/add
Authorization
Authorization
RequiredBearer <token>
In: header
Request Body
application/json
Requiredgame
Requiredstring
Game type for the stock
Value in:
"FREE_FIRE"
codeTxt
Requiredstring
Code text for the stock
amount
number
Amount of the stock
price
string
Price of the stock
Ok