Binance · Capability
Binance Margin Trading API — Account
Binance Margin Trading API — Account. 3 operations. Lead operation: Query cross margin account details. Self-contained Naftiko capability covering one Binance business surface.
What You Can Do
GET
Getmarginaccountinfo
— Query cross margin account details
/v1/sapi/v1/margin/account
GET
Getinterestratehistory
— Query margin interest rate history
/v1/sapi/v1/margin/interestratehistory
POST
Margintransfer
— Cross margin account transfer
/v1/sapi/v1/margin/transfer
MCP Tools
query-cross-margin-account-details
Query cross margin account details
read-only
idempotent
query-margin-interest-rate-history
Query margin interest rate history
read-only
idempotent
cross-margin-account-transfer
Cross margin account transfer
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: Binance Margin Trading API — Account
description: 'Binance Margin Trading API — Account. 3 operations. Lead operation: Query cross margin account details. Self-contained
Naftiko capability covering one Binance business surface.'
tags:
- Binance
- Account
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-account
baseUri: https://api.binance.com
description: Binance Margin Trading API — Account business capability. Self-contained, no shared references.
resources:
- name: sapi-v1-margin-account
path: /sapi/v1/margin/account
operations:
- name: getmarginaccountinfo
method: GET
description: Query cross margin account details
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: recvWindow
in: query
type: integer
- name: timestamp
in: query
type: integer
required: true
- name: signature
in: query
type: string
required: true
- name: sapi-v1-margin-interestRateHistory
path: /sapi/v1/margin/interestRateHistory
operations:
- name: getinterestratehistory
method: GET
description: Query margin interest rate history
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: asset
in: query
type: string
required: true
- name: vipLevel
in: query
type: integer
- name: startTime
in: query
type: integer
- name: endTime
in: query
type: integer
- name: recvWindow
in: query
type: integer
- name: timestamp
in: query
type: integer
required: true
- name: signature
in: query
type: string
required: true
- name: sapi-v1-margin-transfer
path: /sapi/v1/margin/transfer
operations:
- name: margintransfer
method: POST
description: Cross margin account transfer
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: asset
in: query
type: string
required: true
- name: amount
in: query
type: string
required: true
- name: type
in: query
type: integer
description: 1 for spot to margin, 2 for margin to spot.
required: true
- 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-account-rest
port: 8080
description: REST adapter for Binance Margin Trading API — Account. One Spectral-compliant resource per consumed operation,
prefixed with /v1.
resources:
- path: /v1/sapi/v1/margin/account
name: sapi-v1-margin-account
description: REST surface for sapi-v1-margin-account.
operations:
- method: GET
name: getmarginaccountinfo
description: Query cross margin account details
call: margin-trading-account.getmarginaccountinfo
with:
recvWindow: rest.recvWindow
timestamp: rest.timestamp
signature: rest.signature
outputParameters:
- type: object
mapping: $.
- path: /v1/sapi/v1/margin/interestratehistory
name: sapi-v1-margin-interestratehistory
description: REST surface for sapi-v1-margin-interestRateHistory.
operations:
- method: GET
name: getinterestratehistory
description: Query margin interest rate history
call: margin-trading-account.getinterestratehistory
with:
asset: rest.asset
vipLevel: rest.vipLevel
startTime: rest.startTime
endTime: rest.endTime
recvWindow: rest.recvWindow
timestamp: rest.timestamp
signature: rest.signature
outputParameters:
- type: object
mapping: $.
- path: /v1/sapi/v1/margin/transfer
name: sapi-v1-margin-transfer
description: REST surface for sapi-v1-margin-transfer.
operations:
- method: POST
name: margintransfer
description: Cross margin account transfer
call: margin-trading-account.margintransfer
with:
asset: rest.asset
amount: rest.amount
type: rest.type
recvWindow: rest.recvWindow
timestamp: rest.timestamp
signature: rest.signature
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: margin-trading-account-mcp
port: 9090
transport: http
description: MCP adapter for Binance Margin Trading API — Account. One tool per consumed operation, routed inline through
this capability's consumes block.
tools:
- name: query-cross-margin-account-details
description: Query cross margin account details
hints:
readOnly: true
destructive: false
idempotent: true
call: margin-trading-account.getmarginaccountinfo
with:
recvWindow: tools.recvWindow
timestamp: tools.timestamp
signature: tools.signature
outputParameters:
- type: object
mapping: $.
- name: query-margin-interest-rate-history
description: Query margin interest rate history
hints:
readOnly: true
destructive: false
idempotent: true
call: margin-trading-account.getinterestratehistory
with:
asset: tools.asset
vipLevel: tools.vipLevel
startTime: tools.startTime
endTime: tools.endTime
recvWindow: tools.recvWindow
timestamp: tools.timestamp
signature: tools.signature
outputParameters:
- type: object
mapping: $.
- name: cross-margin-account-transfer
description: Cross margin account transfer
hints:
readOnly: false
destructive: false
idempotent: false
call: margin-trading-account.margintransfer
with:
asset: tools.asset
amount: tools.amount
type: tools.type
recvWindow: tools.recvWindow
timestamp: tools.timestamp
signature: tools.signature
outputParameters:
- type: object
mapping: $.