diff --git a/go.mod b/go.mod index 967550e..517c88a 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/angel-one/smartapigo -go 1.14 +go 1.24 require ( - github.com/gorilla/websocket v1.4.2 - github.com/jarcoal/httpmock v1.0.6 + github.com/gorilla/websocket v1.5.3 + github.com/jarcoal/httpmock v1.4.0 ) diff --git a/go.sum b/go.sum index de3c71d..a51558b 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,8 @@ -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/jarcoal/httpmock v1.0.6 h1:e81vOSexXU3mJuJ4l//geOmKIt+Vkxerk1feQBC8D0g= -github.com/jarcoal/httpmock v1.0.6/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/jarcoal/httpmock v1.4.0 h1:BvhqnH0JAYbNudL2GMJKgOHe2CtKlzJ/5rWKyp+hc2k= +github.com/jarcoal/httpmock v1.4.0/go.mod h1:ftW1xULwo+j0R0JJkJIIi7UKigZUXCLLanykgjwBXL0= +github.com/maxatome/go-testdeep v1.14.0 h1:rRlLv1+kI8eOI3OaBXZwb3O7xY3exRzdW5QyX48g9wI= +github.com/maxatome/go-testdeep v1.14.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM= diff --git a/orders.go b/orders.go index f745fe0..c6ae581 100644 --- a/orders.go +++ b/orders.go @@ -6,39 +6,39 @@ import ( // Order represents a individual order response. type Order struct { - Variety string `json:"variety"` - OrderType string `json:"ordertype"` - ProductType string `json:"producttype"` - Duration string `json:"duration"` - Price string `json:"price"` - TriggerPrice string `json:"triggerprice"` - Quantity string `json:"quantity"` - DisclosedQuantity string `json:"disclosedquantity"` - SquareOff string `json:"squareoff"` - StopLoss string `json:"stoploss"` - TrailingStopLoss string `json:"trailingstoploss"` - TrailingSymbol string `json:"trailingsymbol"` - TransactionType string `json:"transactiontype"` - Exchange string `json:"exchange"` - SymbolToken string `json:"symboltoken"` - InstrumentType string `json:"instrumenttype"` - StrikePrice string `json:"strikeprice"` - OptionType string `json:"optiontype"` - ExpiryDate string `json:"expirydate"` - LotSize string `json:"lotsize"` - CancelSize string `json:"cancelsize"` - AveragePrice string `json:"averageprice"` - FilledShares string `json:"filledshares"` - UnfilledShares string `json:"unfilledshares"` - OrderID string `json:"orderid"` - Text string `json:"text"` - Status string `json:"status"` - OrderStatus string `json:"orderstatus"` - UpdateTime string `json:"updatetime"` - ExchangeTime string `json:"exchtime"` - ExchangeOrderUpdateTime string `json:"exchorderupdatetime"` - FillID string `json:"fillid"` - FillTime string `json:"filltime"` + Variety string `json:"variety"` + OrderType string `json:"ordertype"` + ProductType string `json:"producttype"` + Duration string `json:"duration"` + Price float64 `json:"price"` + TriggerPrice string `json:"triggerprice"` + Quantity string `json:"quantity"` + DisclosedQuantity string `json:"disclosedquantity"` + SquareOff string `json:"squareoff"` + StopLoss string `json:"stoploss"` + TrailingStopLoss string `json:"trailingstoploss"` + TrailingSymbol string `json:"trailingsymbol"` + TransactionType string `json:"transactiontype"` + Exchange string `json:"exchange"` + SymbolToken string `json:"symboltoken"` + InstrumentType string `json:"instrumenttype"` + StrikePrice string `json:"strikeprice"` + OptionType string `json:"optiontype"` + ExpiryDate string `json:"expirydate"` + LotSize string `json:"lotsize"` + CancelSize string `json:"cancelsize"` + AveragePrice string `json:"averageprice"` + FilledShares string `json:"filledshares"` + UnfilledShares string `json:"unfilledshares"` + OrderID string `json:"orderid"` + Text string `json:"text"` + Status string `json:"status"` + OrderStatus string `json:"orderstatus"` + UpdateTime string `json:"updatetime"` + ExchangeTime string `json:"exchtime"` + ExchangeOrderUpdateTime string `json:"exchorderupdatetime"` + FillID string `json:"fillid"` + FillTime string `json:"filltime"` } // Orders is a list of orders.