Topup ApiStock
Buy Stocks
Buy Stocks from the User Account using atomic Redis operations. This endpoint uses Redis Sorted Sets with Lua scripts to perform atomic checkout operations. The process uses the key pattern `stock:${ownerId}:${game}:${groupId}` to locate and remove stock IDs. The operation is fully atomic - either all requested stock is acquired or none is taken. After successful Redis checkout, the corresponding PostgreSQL records are updated.
POST
/
stock
/buy
Authorization
Authorization
RequiredBearer <token>
In: header
Request Body
application/json
Requiredgame
Requiredstring
Game type to buy
Value in:
"FREE_FIRE" | "FREE_FIRE_SHELL" | "FREE_FIRE_SG" | "FREE_FIRE_ID"
combination
Requiredarray<number>
Array of combination numbers
quantity
number
Quantity to buy
Ok