From 8cc10764f10f86079e0e8ba7a561e2fd6eaf3c3b Mon Sep 17 00:00:00 2001 From: kolya-bybit Date: Thu, 17 Sep 2026 02:46:29 +0300 Subject: [PATCH] feat(p2p): remove deprecated chat endpoints and reduce ad list max size - remove deprecated Get Chat Message and Send Chat Message endpoints - reduce /v5/p2p/item/personal/list max page size from 50 to 30 --- docs/p2p/ad/ad-list.mdx | 2 +- docs/p2p/order/chat-msg.mdx | 111 ------------------------------- docs/p2p/order/send-chat-msg.mdx | 81 ---------------------- 3 files changed, 1 insertion(+), 193 deletions(-) delete mode 100644 docs/p2p/order/chat-msg.mdx delete mode 100644 docs/p2p/order/send-chat-msg.mdx diff --git a/docs/p2p/ad/ad-list.mdx b/docs/p2p/ad/ad-list.mdx index c203d75fadf..d1e9be2e1c4 100644 --- a/docs/p2p/ad/ad-list.mdx +++ b/docs/p2p/ad/ad-list.mdx @@ -15,7 +15,7 @@ POST `/v5/p2p/item/personal/list` |side|false|string|Ad side for token. `0`: buy; `1`: sell| |tokenId|false|string|Token id. e.g. USDT,ETH,BTC| |page|false|string|Page number. Default Value is 1| -|size|false|string|Page size. Default Value is 10, max is 50| +|size|false|string|Page size. Default Value is 10, max is 30| |currencyId|false|string|Currency id e.g HKD,USD,EUR| ### Response Parameters diff --git a/docs/p2p/order/chat-msg.mdx b/docs/p2p/order/chat-msg.mdx deleted file mode 100644 index d12fafc404a..00000000000 --- a/docs/p2p/order/chat-msg.mdx +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: "[DEPRECATED] Get Chat Message" -sidebar_label: "[DEPRECATED] Get Chat Message" -sidebar_position: 8 ---- - -:::danger -This endpoint has been deprecated. -::: - -### HTTP Request -POST `/v5/p2p/order/message/listpage` - -### Request Parameters -| Parameter | Required | Type | Comments| -|:----- |:-------|:-----|------ | -|orderId|**true** |string |Order ID | -|currentPage|false |string |Current page number| -|size|**true** |string |Page size, max is 30 | - -### Response Parameters -| Parameter | Type | Comments| -|:----- |:-----|----- | -|id |string |Message ID | -|message |string |Message content. Text or image/pdf/video url | -|userId |string |The person who sent the message| -|msgType |int |Message type | -|msgCode |int |System message code| -|createDate |string |Message sending time| -|contentType |string |Message content type | -|orderId |string |Order ID | -|msgUuid |string |Client message UUID| -|nickName |string |Nickname of the person sending the message| -|fileName |string |Image/pdf/video filename| -|accountId |string |Account ID | -|isRead |int |`1`: read, `0`: unread| -|roleType |string |Role type, sys-system message | -|onlyForCustomer|int |Only sent to customer, `1`: true; `0`: false | - -### Request Example - - - - -```http -POST /v5/p2p/order/message/listpage HTTP/1.1 -Host: api-testnet.bybit.com -X-BAPI-SIGN: XXXXX -X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx -X-BAPI-TIMESTAMP: 1675866354698 -X-BAPI-RECV-WINDOW: 5000 -Content-Type: application/json - -{ - "orderId":"1898976123321221120", - "size":"1" -} -``` - - - - -```python -from pybit.unified_trading import HTTP -api = HTTP( - testnet=True, - api_key="xxxxxxxxxxxxxxxxxx", - api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -) -print(api.get_chat_messages( - orderId="1898976123321221120", - size="1" -)) -``` - - - - -### Response Example - -```json -{ - "ret_code": 0, - "ret_msg": "SUCCESS", - "result": { - "result": [ - { - "id": "3000835348", - "accountId": "290120", - "message": "hi, test", - "msgType": 1, - "msgCode": 0, - "createDate": "1741763625000", - "isRead": 0, - "contentType": "str", - "roleType": "user", - "userId": "290118", - "orderId": "1898976123321221120", - "msgUuid": "", - "nickName": "cjmtest", - "read": 0, - "fileName": "", - "onlyForCustomer": 0 - } - ] - }, - "ext_code": "", - "ext_info": {}, - "time_now": "1741765371.720331" -} -``` diff --git a/docs/p2p/order/send-chat-msg.mdx b/docs/p2p/order/send-chat-msg.mdx deleted file mode 100644 index b02fa354203..00000000000 --- a/docs/p2p/order/send-chat-msg.mdx +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: "[DEPRECATED] Send Chat Message" -sidebar_label: "[DEPRECATED] Send Chat Message" -sidebar_position: 6 ---- - -:::danger -This endpoint has been deprecated. -::: - -### HTTP Request -POST `/v5/p2p/order/message/send` - -### Request Parameters -| Parameter | Required | Type | Comments| -|:----- |:-------|:-----|------ | -|message|**true** |string |Chat message. Is either: the text of the message you send, or the URL of the file you want to send| -|contentType|**true** |string |Chat message. | -|orderId|**true** |string |Order ID | -|msgUuid|**true** |string |Client message UUID | -|fileName|false |string |Image/pdf/video filename | - -### Response Parameters -None - -### Request Example - - - - -```http -POST /v5/p2p/order/message/send HTTP/1.1 -Host: api-testnet.bybit.com -X-BAPI-SIGN: XXXXX -X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx -X-BAPI-TIMESTAMP: 1675866354698 -X-BAPI-RECV-WINDOW: 5000 -Content-Type: application/json - -{ - "message":"hi, test", - "contentType":"str", - "orderId":"1898976123321221120", - "msgUuid":"cf016044-c754-4be0-b2dc-b403ecce150d" -} -``` - - - - -```python -from pybit.unified_trading import HTTP -import uuid -api = HTTP( - testnet=True, - api_key="xxxxxxxxxxxxxxxxxx", - api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -) -print(api.send_chat_message( - message="hi, test", - contentType="str", - orderId="1898976123321221120", - msgUuid=uuid.uuid4().hex -)) -``` - - - - -### Response Example - -```json -{ - "ret_code": 0, - "ret_msg": "SUCCESS", - "result": null, - "ext_code": "", - "ext_info": {}, - "time_now": "1741763625.212991" -} -```