For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update Margin

Manually add or reduce margin for a futures position on PointPay Exchange.

Details

POST https://api.pointpay.io/fapi/v1/private/trade/update-margin

Headers

Name
Type
Description

X-TXC-APIKEY*

STRING

Public API key

X-TXC-PAYLOAD*

STRING

Base64-encoded request body

X-TXC-SIGNATURE*

STRING

HmacSHA512 signature of the request body

Request Body

Name
Type
Description
Example

symbol*

STRING

Trading pair

BTCUSDT

margin*

NUMERIC

Add or reduce. To add, then 10; To reduce, then -10. Support up to 4 decimal

50

positionIdx

INTEGER

Position index. Available values: - 0: one-way mode - 1: hedge-mode Buy side - 2: hedge-mode Sell side

0

Fields marked with * are required.

CURL Example
curl -X POST "https://api.pointpay.io/fapi/v1/private/trade/update-margin" \
  -H "accept: application/json" \
  -H "X-TXC-APIKEY: <api-key>" \
  -H "X-TXC-PAYLOAD: <base64-payload>" \
  -H "X-TXC-SIGNATURE: <signature>" \
  -H "Content-Type: application/json" \
  -d '{
    "symbol": "BTCUSDT",
    "margin": 50,
    "positionIdx": 0
  }'

Response parameters:

Name
Type
Description

category

STRING

Product category

positionIdx

INTEGER

Position index

riskLimitValue

STRING

Risk limit value

symbol

STRING

Trading pair

size

STRING

Position size

positionValue

STRING

Position value

avgPrice

STRING

Average entry price

liqPrice

STRING

Liquidation price

bustPrice

STRING

Bankruptcy price

markPrice

STRING

Mark price

leverage

STRING

Applied leverage

autoAddMargin

INTEGER

Auto-add-margin flag

positionStatus

STRING

Position status

positionIM

STRING

Initial margin

positionMM

STRING

Maintenance margin

unrealisedPnl

STRING

Unrealized profit and loss

cumRealisedPnl

STRING

Cumulative realized profit and loss

takeProfit

STRING

Take-profit price

stopLoss

STRING

Stop-loss price

trailingStop

STRING

Trailing stop value

createdTime

STRING

Position creation time in milliseconds

updatedTime

STRING

Last update time in milliseconds

Response example:

Response example

Returned when the request is invalid.

Common reasons:

  • Invalid request format

  • Invalid headers

Response example

Returned when authentication headers are missing / invalid or API Keys are not enabled.

Last updated