SellBack - Saba-sports/OddsDirectAPI GitHub Wiki
This API is to sell ticket back.
Request
POST /cashout/{version}/SellBack?transId=123456&cashoutPrice=10
Accept: application/json
X-Forwarded-For: client ip (If using API via proxy)
Authorization: Bearer {JWT token}
Parameter |
Format |
Mandatory |
Description |
transId |
long |
Yes |
Specifies the transaction number of saba system. |
cashoutPrice |
decimal |
Yes |
Specifies the price of cashout which from /GetCashoutPrice . |
Response
{
"transId": long,
"sellingStatus": int,
"soldStake": decimal,
"paid":decimal,
"newCashoutPriceInfo":PriceInfo
}
Parameter |
Format |
Description |
transId |
long |
Specifies the transaction number of Saba system. |
sellingStatus |
int |
Specifies the status of the selling cashout ticket.1:Waiting2:Accept3:Reject5:New Offer |
soldStake |
decimal |
Specifies the stake of the selling cashout ticket. |
paid |
decimal |
Specifies the paid of the selling cashout. |
newCashoutPriceInfo |
PriceInfo |
Specifies the new cashout price information.Only return when sellingStatus is 5 (New Offer). |
PriceInfo
{
"transId": long,
"cashoutStatus": int,
"cashoutStake": decimal,
"cashoutPrice": decimal
}
Parameter |
Format |
Description |
transId |
long |
Specifies the transaction number of Saba system |
cashoutStatus |
int |
Specifies the cashout status.1:CanCashout2:CannotCashout (Currently not support cashout)3:NoCashoutTicket (This ticket not support cashout)4:TicketNotFound |
cashoutStake |
decimal |
Specifies the stake of cashout. |
cashoutPrice |
decimal |
Specifies the price of cashout. |
ErrorCode Enumeration
Error Code |
Message |
Description |
E001 |
Internal Server Error |
The server encountered an unexpected condition that prevented it from fulfilling the request. |
E002 |
Invalid parameter input |
The parameter input is invalid or not support. |
B019 |
Transaction Id Not Found |
The system can not find the transaction Id. |
B025 |
Cannot Cashout |
The ticket cannot be cashout. |