github.com/vmpartner/bitmex@v1.1.0/swagger/margin.go (about)

     1  /* 
     2   * BitMEX API
     3   *
     4   * ## REST API for the BitMEX Trading Platform  [View Changelog](/app/apiChangelog)    #### Getting Started   ##### Fetching Data  All REST endpoints are documented below. You can try out any query right from this interface.  Most table queries accept `count`, `start`, and `reverse` params. Set `reverse=true` to get rows newest-first.  Additional documentation regarding filters, timestamps, and authentication is available in [the main API documentation](https://www.bitmex.com/app/restAPI).  *All* table data is available via the [Websocket](/app/wsAPI). We highly recommend using the socket if you want to have the quickest possible data without being subject to ratelimits.  ##### Return Types  By default, all data is returned as JSON. Send `?_format=csv` to get CSV data or `?_format=xml` to get XML data.  ##### Trade Data Queries  *This is only a small subset of what is available, to get you started.*  Fill in the parameters and click the `Try it out!` button to try any of these queries.  * [Pricing Data](#!/Quote/Quote_get)  * [Trade Data](#!/Trade/Trade_get)  * [OrderBook Data](#!/OrderBook/OrderBook_getL2)  * [Settlement Data](#!/Settlement/Settlement_get)  * [Exchange Statistics](#!/Stats/Stats_history)  Every function of the BitMEX.com platform is exposed here and documented. Many more functions are available.  ##### Swagger Specification  [⇩ Download Swagger JSON](swagger.json)    ## All API Endpoints  Click to expand a section. 
     5   *
     6   * OpenAPI spec version: 1.2.0
     7   * Contact: support@bitmex.com
     8   * Generated by: https://github.com/swagger-api/swagger-codegen.git
     9   */
    10  
    11  package swagger
    12  
    13  import (
    14  	"time"
    15  )
    16  
    17  type Margin struct {
    18  	Account float32 `json:"account"`
    19  
    20  	Currency string `json:"currency"`
    21  
    22  	RiskLimit float32 `json:"riskLimit,omitempty"`
    23  
    24  	PrevState string `json:"prevState,omitempty"`
    25  
    26  	State string `json:"state,omitempty"`
    27  
    28  	Action string `json:"action,omitempty"`
    29  
    30  	Amount float32 `json:"amount,omitempty"`
    31  
    32  	PendingCredit float32 `json:"pendingCredit,omitempty"`
    33  
    34  	PendingDebit float32 `json:"pendingDebit,omitempty"`
    35  
    36  	ConfirmedDebit float32 `json:"confirmedDebit,omitempty"`
    37  
    38  	PrevRealisedPnl float32 `json:"prevRealisedPnl,omitempty"`
    39  
    40  	PrevUnrealisedPnl float32 `json:"prevUnrealisedPnl,omitempty"`
    41  
    42  	GrossComm float32 `json:"grossComm,omitempty"`
    43  
    44  	GrossOpenCost float32 `json:"grossOpenCost,omitempty"`
    45  
    46  	GrossOpenPremium float32 `json:"grossOpenPremium,omitempty"`
    47  
    48  	GrossExecCost float32 `json:"grossExecCost,omitempty"`
    49  
    50  	GrossMarkValue float32 `json:"grossMarkValue,omitempty"`
    51  
    52  	RiskValue float32 `json:"riskValue,omitempty"`
    53  
    54  	TaxableMargin float32 `json:"taxableMargin,omitempty"`
    55  
    56  	InitMargin float32 `json:"initMargin,omitempty"`
    57  
    58  	MaintMargin float32 `json:"maintMargin,omitempty"`
    59  
    60  	SessionMargin float32 `json:"sessionMargin,omitempty"`
    61  
    62  	TargetExcessMargin float32 `json:"targetExcessMargin,omitempty"`
    63  
    64  	VarMargin float32 `json:"varMargin,omitempty"`
    65  
    66  	RealisedPnl float32 `json:"realisedPnl,omitempty"`
    67  
    68  	UnrealisedPnl float32 `json:"unrealisedPnl,omitempty"`
    69  
    70  	IndicativeTax float32 `json:"indicativeTax,omitempty"`
    71  
    72  	UnrealisedProfit float32 `json:"unrealisedProfit,omitempty"`
    73  
    74  	SyntheticMargin float32 `json:"syntheticMargin,omitempty"`
    75  
    76  	WalletBalance float32 `json:"walletBalance,omitempty"`
    77  
    78  	MarginBalance float32 `json:"marginBalance,omitempty"`
    79  
    80  	MarginBalancePcnt float64 `json:"marginBalancePcnt,omitempty"`
    81  
    82  	MarginLeverage float64 `json:"marginLeverage,omitempty"`
    83  
    84  	MarginUsedPcnt float64 `json:"marginUsedPcnt,omitempty"`
    85  
    86  	ExcessMargin float32 `json:"excessMargin,omitempty"`
    87  
    88  	ExcessMarginPcnt float64 `json:"excessMarginPcnt,omitempty"`
    89  
    90  	AvailableMargin float32 `json:"availableMargin,omitempty"`
    91  
    92  	WithdrawableMargin float32 `json:"withdrawableMargin,omitempty"`
    93  
    94  	Timestamp time.Time `json:"timestamp,omitempty"`
    95  
    96  	GrossLastValue float32 `json:"grossLastValue,omitempty"`
    97  
    98  	Commission float64 `json:"commission,omitempty"`
    99  }