Skip to content

Commit

Permalink
Update the Intrument Info endpoint response with the latest detail (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shravan40 authored Oct 16, 2024
1 parent e89a206 commit d18f5f2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
21 changes: 10 additions & 11 deletions market_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,12 +390,11 @@ func (s *marketTestSuite) TestInstrumentsInfo() {
"status": "Trading",
"marginTrading": "both",
"lotSizeFilter": {
"basePrecision": "0.000001",
"quotePrecision": "0.00000001",
"minOrderQty": "0.000048",
"maxOrderQty": "71.73956243",
"minOrderAmt": "1",
"maxOrderAmt": "2000000"
"minOrderQty": "0.000048",
"maxOrderQty": "71.73956243",
"minNotionalValue": "5.00",
"maxMktOrderQty": "10.0",
"postOnlyMaxOrderQty": "71.73956243"
},
"priceFilter": {
"tickSize": "0.01"
Expand Down Expand Up @@ -446,11 +445,11 @@ func (s *marketTestSuite) TestInstrumentsInfo() {
Status: "Trading",
MarginTrading: "both",
LotSizeFilter: models.LotSizeFilter{
BasePrecision: "0.000001",
QuotePrecision: "0.00000001",
MinOrderQty: "0.000048",
MaxOrderQty: "71.73956243", MinOrderAmt: "1",
MaxOrderAmt: "2000000",
MinOrderQty: "0.000048",
MaxOrderQty: "71.73956243",
MinNotionalValue: "5.00",
MaxMktOrderQty: "10.0",
PostOnlyMaxOrderQty: "71.73956243",
},
PriceFilter: models.PriceFilter{
TickSize: "0.01",
Expand Down
15 changes: 6 additions & 9 deletions models/marketResponse.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,12 @@ type Instrument struct {
LotSizeFilter LotSizeFilter `json:"lotSizeFilter"`
UnifiedMarginTrade bool `json:"unifiedMarginTrade"`
FundingInterval int `json:"fundingInterval"`
UpperFundingRate string `json:"upperFundingRate"`
LowerFundingRate string `json:"lowerFundingRate"`
SettleCoin string `json:"settleCoin"`
CopyTrading string `json:"copyTrading"`
IsPreListing bool `json:"isPreListing"`
PreListingInfo string `json:"preListingInfo"`
}

type LeverageFilter struct {
Expand All @@ -107,18 +111,11 @@ type LotSizeFilter struct {
MaxOrderQty string `json:"maxOrderQty"`
MinOrderQty string `json:"minOrderQty"`
QtyStep string `json:"qtyStep"`
MaxMktOrderQty string `json:"maxMktOrderQty"`
MinNotionalValue string `json:"minNotionalValue"`
PostOnlyMaxOrderQty string `json:"postOnlyMaxOrderQty"`
BasePrecision string `json:"basePrecision"`
QuotePrecision string `json:"quotePrecision"`
MaxOrderAmt string `json:"maxOrderAmt"`
MinOrderAmt string `jsoN:"minOrderAmt"`
}

// type OrderBookEntry struct {
// Price string `json:"0"`
// Size string `json:"1"`
// }

type OrderBookEntry []string

type OrderBookInfo struct {
Expand Down

0 comments on commit d18f5f2

Please sign in to comment.