Update / Relist Ad
HTTP Request
POST /v5/p2p/item/update
Request Parameters
| Parameter | Required | Type | Comments |
|---|---|---|---|
| id | true | string | Advertisement ID |
| priceType | true | string | Pricing exchange rate model. 0: fixed rate; 1: floating rate |
| premium | true | string | Floating ratio with current exchange rate |
| price | true | string | Price per token, in currency |
| minAmount | true | string | Min transaction amount in currency |
| maxAmount | true | string | Max transaction amount in currency |
| remark | true | string | Advertisement description (max length: 900) |
| tradingPreferenceSet | true | Object | Trading Preferences |
| > hasUnPostAd | false | string | Whether the counterparty must not have posted any advertisements. 0: not required, 1: required |
| > isKyc | false | string | Is it necessary for the counterparty to complete identity authentication? 0: not required, 1: required |
| > isEmail | false | string | Is it necessary for the counterparty to bind an email address? 0: not required, 1: required |
| > isMobile | false | integer | Is it necessary for the counterparty to bind a mobile number? 0: not required1: required |
| > hasRegisterTime | false | string | Is the registration time required to be no less than {} days? 0: not required, 1: required |
| > registerTimeThreshold | false | string | Registration time threshold(Unit: Day) |
| > orderFinishNumberDay30 | false | string | Limit on number of completed orders in the last 30 days |
| > completeRateDay30 | false | string | Completion rate in the last 30 days |
| > nationalLimit | false | string | KYC restricted countries. Format: three-letter ISO country code |
| > hasOrderFinishNumberDay30 | false | string | Is it necessary to have no less than {} orders in the last 30 days? 0: not required, 1: required |
| > hasCompleteRateDay30 | false | string | Is it necessary to have a completion rate of no less than {} in the last 30 days? 0: not required, 1: required |
| > hasNationalLimit | false | string | Are country restrictions required? 0: not required, 1: required |
| paymentIds | true | array[string] | Payment method type ID (len<=5). Please use Get User Payment to get id of a payment method added to your account. |
| actionType | true | string | Operation type: MODIFY: modify ad; ACTIVE: reonline adv |
| quantity | true | string | Number of tokens in an advertisement |
| paymentPeriod | true | string | Payment period (unit: minutes) |
Response Parameters
None
Request Example
- HTTP
- Python
POST /v5/p2p/item/update HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1741769463827
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
{
"priceType": "0",
"premium": "",
"quantity": "1000",
"minAmount": "25",
"maxAmount": "5000",
"paymentPeriod": "15",
"remark": "",
"price": "0.914",
"paymentIds": [
"-1"
],
"tradingPreferenceSet": {},
"actionType": "ACTIVE",
"id": "1898988222063644672"
}
from bybit_p2p import P2P
api = P2P(
testnet=True,
api_key="xxxxxxxxxxxxxxxxxx",
api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
)
print(api.update_ad(
id="1898988222063644672",
priceType=0,
premium="",
price=0.914,
minAmount=25,
maxAmount=5000,
remark="",
tradingPreferenceSet={},
paymentIds=["-1"],
actionType="ACTIVE",
quantity="1000",
paymentPeriod="15"
))
Response Example
{
"ret_code": 0,
"ret_msg": "SUCCESS",
"result": {
"securityRiskToken": "",
"riskTokenType": "",
"riskVersion": "",
"needSecurityRisk": false
},
"ext_code": "",
"ext_info": {},
"time_now": "1741769514.655369"
}