Binance · Capability
Binance Margin Trading API — Borrow/Repay
Binance Margin Trading API — Borrow/Repay. 1 operations. Lead operation: Query borrow/repay records. Self-contained Naftiko capability covering one Binance business surface.
What You Can Do
GET
Getborrowrepayrecords
— Query borrow/repay records
/v1/sapi/v1/margin/borrow-repay
MCP Tools
query-borrow-repay-records
Query borrow/repay records
read-only
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: Binance Margin Trading API — Borrow/Repay
description: 'Binance Margin Trading API — Borrow/Repay. 1 operations. Lead operation: Query borrow/repay records. Self-contained
Naftiko capability covering one Binance business surface.'
tags:
- Binance
- Borrow/Repay
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
BINANCE_API_KEY: BINANCE_API_KEY
capability:
consumes:
- type: http
namespace: margin-trading-borrow-repay
baseUri: https://api.binance.com
description: Binance Margin Trading API — Borrow/Repay business capability. Self-contained, no shared references.
resources:
- name: sapi-v1-margin-borrow-repay
path: /sapi/v1/margin/borrow-repay
operations:
- name: getborrowrepayrecords
method: GET
description: Query borrow/repay records
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: asset
in: query
type: string
description: Asset to query.
- name: isolatedSymbol
in: query
type: string
description: Isolated margin symbol.
- name: type
in: query
type: string
description: BORROW or REPAY.
required: true
- name: startTime
in: query
type: integer
- name: endTime
in: query
type: integer
- name: current
in: query
type: integer
description: Current page. Default 1.
- name: size
in: query
type: integer
description: Page size. Default 10, max 100.
- name: recvWindow
in: query
type: integer
- name: timestamp
in: query
type: integer
required: true
- name: signature
in: query
type: string
required: true
authentication:
type: apikey
key: X-MBX-APIKEY
value: '{{env.BINANCE_API_KEY}}'
placement: header
exposes:
- type: rest
namespace: margin-trading-borrow-repay-rest
port: 8080
description: REST adapter for Binance Margin Trading API — Borrow/Repay. One Spectral-compliant resource per consumed
operation, prefixed with /v1.
resources:
- path: /v1/sapi/v1/margin/borrow-repay
name: sapi-v1-margin-borrow-repay
description: REST surface for sapi-v1-margin-borrow-repay.
operations:
- method: GET
name: getborrowrepayrecords
description: Query borrow/repay records
call: margin-trading-borrow-repay.getborrowrepayrecords
with:
asset: rest.asset
isolatedSymbol: rest.isolatedSymbol
type: rest.type
startTime: rest.startTime
endTime: rest.endTime
current: rest.current
size: rest.size
recvWindow: rest.recvWindow
timestamp: rest.timestamp
signature: rest.signature
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: margin-trading-borrow-repay-mcp
port: 9090
transport: http
description: MCP adapter for Binance Margin Trading API — Borrow/Repay. One tool per consumed operation, routed inline
through this capability's consumes block.
tools:
- name: query-borrow-repay-records
description: Query borrow/repay records
hints:
readOnly: true
destructive: false
idempotent: true
call: margin-trading-borrow-repay.getborrowrepayrecords
with:
asset: tools.asset
isolatedSymbol: tools.isolatedSymbol
type: tools.type
startTime: tools.startTime
endTime: tools.endTime
current: tools.current
size: tools.size
recvWindow: tools.recvWindow
timestamp: tools.timestamp
signature: tools.signature
outputParameters:
- type: object
mapping: $.