Skip to content

feat: add isolated margin adjustment endpoint#99

Open
Vinayak1337 wants to merge 1 commit into
singlesly:mainfrom
Vinayak1337:fix/position-margin
Open

feat: add isolated margin adjustment endpoint#99
Vinayak1337 wants to merge 1 commit into
singlesly:mainfrom
Vinayak1337:fix/position-margin

Conversation

@Vinayak1337
Copy link
Copy Markdown

Fixes #89

What changed

  • Added a signed POST /openApi/swap/v2/trade/positionMargin endpoint for adjusting isolated position margin.
  • Exposed the endpoint through TradeService.adjustIsolatedMargin.
  • Supported required symbol, amount, and adjustment type fields, plus optional positionSide, positionId, and recvWindow.
  • Added focused tests for service dispatch, request shape, and optional-parameter omission.
  • Marked the README feature checkbox as supported.
  • Removed one unused import so lint passes.

Tests

  • npm test -- trade.service.spec.ts
  • npm run lint
  • npm run build

@Vinayak1337 Vinayak1337 marked this pull request as ready for review May 11, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement adjust isolated margin endpoint

1 participant