Skip to content

Latest commit

 

History

History
94 lines (65 loc) · 6.34 KB

ExecutionApi.md

File metadata and controls

94 lines (65 loc) · 6.34 KB

\ExecutionApi

All URIs are relative to https://www.bitmex.com/api/v1

Method HTTP request Description
ExecutionGet Get /execution Get all raw executions for your account.
ExecutionGetTradeHistory Get /execution/tradeHistory Get all balance-affecting executions.

ExecutionGet

[]Execution ExecutionGet(ctx, optional) Get all raw executions for your account.

This returns all raw transactions, which includes order opening and cancelation, and order status changes. It can be quite noisy. More focused information is available at /execution/tradeHistory. You may also use the filter param to target your query. Specify an array as a filter value, such as {\"execType\": [\"Settlement\", \"Trade\"]} to filter on multiple values. See 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 *ExecutionApiExecutionGetOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ExecutionApiExecutionGetOpts struct

Name Type Description Notes
symbol optional.String Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. Symbols are case-insensitive.
filter optional.String Generic table filter. Send JSON key/value pairs, such as `{"key": "value"}`. You can key on individual fields, and do more advanced querying on timestamps. See the Timestamp Docs for more details.
columns optional.String Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect.
count optional.Int32 Number of results to fetch. Must be a positive integer. [default to 100]
start optional.Int32 Starting point for results. [default to 0]
reverse optional.Bool If true, will sort results newest first. [default to false]
startTime optional.Time Starting date filter for results.
endTime optional.Time Ending date filter for results.

Return type

[]Execution

Authorization

apiExpires, apiKey, 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]

ExecutionGetTradeHistory

[]Execution ExecutionGetTradeHistory(ctx, optional) Get all balance-affecting executions.

Required Parameters

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

Optional Parameters

Optional parameters are passed through a pointer to a ExecutionApiExecutionGetTradeHistoryOpts struct

Name Type Description Notes
targetAccountId optional.Float64 AccountId fetching the trade history, must be a paired account with main user.
targetAccountIds optional.String AccountIds fetching the trade history, must be a paired account with main user. Can be wildcard * to get all accounts linked to the authenticated user
symbol optional.String Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. Symbols are case-insensitive.
filter optional.String Generic table filter. Send JSON key/value pairs, such as `{"key": "value"}`. You can key on individual fields, and do more advanced querying on timestamps. See the Timestamp Docs for more details.
columns optional.String Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect.
count optional.Int32 Number of results to fetch. Must be a positive integer. [default to 100]
start optional.Int32 Starting point for results. [default to 0]
reverse optional.Bool If true, will sort results newest first. [default to false]
startTime optional.Time Starting date filter for results.
endTime optional.Time Ending date filter for results.

Return type

[]Execution

Authorization

apiExpires, apiKey, 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]