Skip to content

Latest commit

 

History

History
166 lines (106 loc) · 6.83 KB

PositionApi.md

File metadata and controls

166 lines (106 loc) · 6.83 KB

\PositionApi

All URIs are relative to https://localhost/api/v1

Method HTTP request Description
PositionGet Get /position Get your positions.
PositionIsolateMargin Post /position/isolate Enable isolated margin or cross margin per-position.
PositionTransferIsolatedMargin Post /position/transferMargin Transfer equity in or out of a position.
PositionUpdateLeverage Post /position/leverage Choose leverage for a position.
PositionUpdateRiskLimit Post /position/riskLimit Update your risk limit.

PositionGet

[]Position PositionGet(ctx, optional) Get your positions.

See <a href="http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AP_6580.html\">the FIX Spec for explanations of these fields.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *PositionGetOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a PositionGetOpts struct

Name Type Description Notes
filter optional.String Table filter. For example, send {&quot;symbol&quot;: &quot;XBTUSD&quot;}.
columns optional.String Which columns to fetch. For example, send [&quot;columnName&quot;].
count optional.Int Number of rows to fetch.

Return type

[]Position

Authorization

apiKey, apiNonce, apiSignature

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json, application/xml, text/xml, application/javascript, text/javascript

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PositionIsolateMargin

Position PositionIsolateMargin(ctx, symbol, optional) Enable isolated margin or cross margin per-position.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
symbol string Position symbol to isolate.
optional *PositionIsolateMarginOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a PositionIsolateMarginOpts struct

Name Type Description Notes

enabled | optional.Bool| True for isolated margin, false for cross margin. | [default to true]

Return type

Position

Authorization

apiKey, apiNonce, apiSignature

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json, application/xml, text/xml, application/javascript, text/javascript

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PositionTransferIsolatedMargin

Position PositionTransferIsolatedMargin(ctx, symbol, amount) Transfer equity in or out of a position.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
symbol string Symbol of position to isolate.
amount int Amount to transfer, in Satoshis. May be negative.

Return type

Position

Authorization

apiKey, apiNonce, apiSignature

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json, application/xml, text/xml, application/javascript, text/javascript

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PositionUpdateLeverage

Position PositionUpdateLeverage(ctx, symbol, leverage) Choose leverage for a position.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
symbol string Symbol of position to adjust.
leverage float64 Leverage value. Send a number between 0.01 and 100 to enable isolated margin with a fixed leverage. Send 0 to enable cross margin.

Return type

Position

Authorization

apiKey, apiNonce, apiSignature

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json, application/xml, text/xml, application/javascript, text/javascript

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PositionUpdateRiskLimit

Position PositionUpdateRiskLimit(ctx, symbol, riskLimit) Update your risk limit.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
symbol string Symbol of position to update risk limit on.
riskLimit int New Risk Limit, in Satoshis.

Return type

Position

Authorization

apiKey, apiNonce, apiSignature

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json, application/xml, text/xml, application/javascript, text/javascript

[Back to top] [Back to API list] [Back to Model list] [Back to README]