Skip to content

Commit

Permalink
updated a few tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MarketDataApp committed Feb 27, 2024
1 parent 1623c9e commit 8b2a4eb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
14 changes: 7 additions & 7 deletions options_expirations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ func ExampleOptionsExpirationsResponse_get() {
for _, expirations := range resp {
fmt.Println(expirations)
}
// Output: 2009-02-21 16:00:00 -0500 EST
// 2009-03-21 16:00:00 -0400 EDT
// 2009-04-18 16:00:00 -0400 EDT
// 2009-07-18 16:00:00 -0400 EDT
// 2010-01-16 16:00:00 -0500 EST
// 2011-01-22 16:00:00 -0500 EST
// Output: 2009-02-20 16:00:00 -0500 EST
// 2009-03-20 16:00:00 -0400 EDT
// 2009-04-17 16:00:00 -0400 EDT
// 2009-07-17 16:00:00 -0400 EDT
// 2010-01-15 16:00:00 -0500 EST
// 2011-01-21 16:00:00 -0500 EST
}

func ExampleOptionsExpirationsResponse_packed() {
Expand All @@ -28,5 +28,5 @@ func ExampleOptionsExpirationsResponse_packed() {
}

fmt.Println(resp)
// Output: OptionsExpirationsResponse{Expirations: [2009-02-21 2009-03-21 2009-04-18 2009-07-18 2010-01-16 2011-01-22], Updated: 1233723600}
// Output: OptionsExpirationsResponse{Expirations: [2009-02-20 2009-03-20 2009-04-17 2009-07-17 2010-01-15 2011-01-21], Updated: 1233723600}
}
4 changes: 2 additions & 2 deletions options_quotes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func ExampleOptionQuoteRequest_get() {
for _, quote := range resp {
fmt.Println(quote)
}
// Output: OptionQuote{OptionSymbol: "AAPL250117C00150000", Underlying: "AAPL", Expiration: 2025-01-17 16:00:00 -05:00, Side: "call", Strike: 150, FirstTraded: 2022-09-10 09:30:00 -04:00, DTE: 347, Ask: 47.7, AskSize: 17, Bid: 47.2, BidSize: 36, Mid: 47.45, Last: 48.65, Volume: 202, OpenInterest: 10768, UnderlyingPrice: 187.68, InTheMoney: true, Updated: "2024-02-05 16:00:00 -05:00", IV: nil, Delta: nil, Gamma: nil, Theta: nil, Vega: nil, Rho: nil, IntrinsicValue: 37.68, ExtrinsicValue: 9.77}
// OptionQuote{OptionSymbol: "AAPL250117C00150000", Underlying: "AAPL", Expiration: 2025-01-17 16:00:00 -05:00, Side: "call", Strike: 150, FirstTraded: 2022-09-12 09:30:00 -04:00, DTE: 347, Ask: 47.7, AskSize: 17, Bid: 47.2, BidSize: 36, Mid: 47.45, Last: 48.65, Volume: 202, OpenInterest: 10768, UnderlyingPrice: 187.68, InTheMoney: true, Updated: "2024-02-05 16:00:00 -05:00", IV: nil, Delta: nil, Gamma: nil, Theta: nil, Vega: nil, Rho: nil, IntrinsicValue: 37.68, ExtrinsicValue: 9.77}
}

func ExampleOptionQuoteRequest_packed() {
Expand All @@ -23,6 +23,6 @@ func ExampleOptionQuoteRequest_packed() {
}

fmt.Println(resp)
// Output: OptionQuotesResponse{OptionSymbol: ["AAPL250117P00150000"], Underlying: ["AAPL"], Expiration: [1737147600], Side: ["put"], Strike: [150], FirstTraded: [1662816600], DTE: [347], Ask: [3.65], AskSize: [292], Bid: [3.5], BidSize: [634], Mid: [3.58], Last: [3.55], Volume: [44], OpenInterest: [18027], UnderlyingPrice: [187.68], InTheMoney: [false], Updated: [1707166800], IV: [], Delta: [], Gamma: [], Theta: [], Vega: [], Rho: [], IntrinsicValue: [0], ExtrinsicValue: [3.58]}
// OptionQuotesResponse{OptionSymbol: ["AAPL250117P00150000"], Underlying: ["AAPL"], Expiration: [1737147600], Side: ["put"], Strike: [150], FirstTraded: [1662989400], DTE: [347], Ask: [3.65], AskSize: [292], Bid: [3.5], BidSize: [634], Mid: [3.58], Last: [3.55], Volume: [44], OpenInterest: [18027], UnderlyingPrice: [187.68], InTheMoney: [false], Updated: [1707166800], IV: [], Delta: [], Gamma: [], Theta: [], Vega: [], Rho: [], IntrinsicValue: [0], ExtrinsicValue: [3.58]}
}

14 changes: 7 additions & 7 deletions options_strikes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ func ExampleOptionStrikesRequest_get() {
for _, expiration := range resp {
fmt.Println(expiration)
}
// Output: OptionStrikes{Expiration: 2009-02-21, Strikes: [40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 115.00 120.00 125.00 130.00 135.00 140.00]}
// OptionStrikes{Expiration: 2009-03-21, Strikes: [35.00 40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 115.00 120.00 125.00 130.00 135.00]}
// OptionStrikes{Expiration: 2009-04-18, Strikes: [15.00 17.50 20.00 22.50 25.00 30.00 35.00 40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 115.00 120.00 125.00 130.00 135.00 140.00 145.00 150.00 155.00 160.00 165.00 170.00 175.00 180.00 185.00 190.00 195.00 200.00 210.00 220.00 230.00 240.00 250.00 260.00 270.00 280.00 290.00 300.00]}
// OptionStrikes{Expiration: 2009-07-18, Strikes: [12.50 15.00 17.50 20.00 22.50 25.00 30.00 35.00 40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 115.00 120.00 125.00 130.00 135.00 140.00 145.00 150.00 155.00 160.00 165.00 170.00 175.00 180.00 185.00 190.00]}
// OptionStrikes{Expiration: 2010-01-16, Strikes: [22.50 25.00 30.00 35.00 40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 120.00 125.00 130.00 135.00 140.00 145.00 150.00 155.00 160.00 170.00 180.00 190.00 200.00 210.00 220.00 230.00 240.00 250.00 260.00 270.00 280.00 290.00 300.00 310.00 320.00 330.00 340.00 350.00 360.00 370.00 380.00 390.00 400.00]}
// OptionStrikes{Expiration: 2011-01-22, Strikes: [20.00 30.00 40.00 50.00 60.00 70.00 80.00 85.00 90.00 95.00 100.00 110.00 120.00 125.00 130.00 140.00 150.00 160.00 170.00 180.00 190.00 200.00 210.00 220.00 230.00 240.00]}
// Output: OptionStrikes{Expiration: 2009-02-20, Strikes: [40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 115.00 120.00 125.00 130.00 135.00 140.00]}
// OptionStrikes{Expiration: 2009-03-20, Strikes: [35.00 40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 115.00 120.00 125.00 130.00 135.00]}
// OptionStrikes{Expiration: 2009-04-17, Strikes: [15.00 17.50 20.00 22.50 25.00 30.00 35.00 40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 115.00 120.00 125.00 130.00 135.00 140.00 145.00 150.00 155.00 160.00 165.00 170.00 175.00 180.00 185.00 190.00 195.00 200.00 210.00 220.00 230.00 240.00 250.00 260.00 270.00 280.00 290.00 300.00]}
// OptionStrikes{Expiration: 2009-07-17, Strikes: [12.50 15.00 17.50 20.00 22.50 25.00 30.00 35.00 40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 115.00 120.00 125.00 130.00 135.00 140.00 145.00 150.00 155.00 160.00 165.00 170.00 175.00 180.00 185.00 190.00]}
// OptionStrikes{Expiration: 2010-01-15, Strikes: [22.50 25.00 30.00 35.00 40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 120.00 125.00 130.00 135.00 140.00 145.00 150.00 155.00 160.00 170.00 180.00 190.00 200.00 210.00 220.00 230.00 240.00 250.00 260.00 270.00 280.00 290.00 300.00 310.00 320.00 330.00 340.00 350.00 360.00 370.00 380.00 390.00 400.00]}
// OptionStrikes{Expiration: 2011-01-21, Strikes: [20.00 30.00 40.00 50.00 60.00 70.00 80.00 85.00 90.00 95.00 100.00 110.00 120.00 125.00 130.00 140.00 150.00 160.00 170.00 180.00 190.00 200.00 210.00 220.00 230.00 240.00]}
}

func ExampleOptionStrikesRequest_packed() {
Expand All @@ -28,5 +28,5 @@ func ExampleOptionStrikesRequest_packed() {
}

fmt.Println(resp)
// Output: OptionStrikesResponse{Strikes: [2009-02-21:[40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 115.00 120.00 125.00 130.00 135.00 140.00], 2009-03-21:[35.00 40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 115.00 120.00 125.00 130.00 135.00], 2009-04-18:[15.00 17.50 20.00 22.50 25.00 30.00 35.00 40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 115.00 120.00 125.00 130.00 135.00 140.00 145.00 150.00 155.00 160.00 165.00 170.00 175.00 180.00 185.00 190.00 195.00 200.00 210.00 220.00 230.00 240.00 250.00 260.00 270.00 280.00 290.00 300.00], 2009-07-18:[12.50 15.00 17.50 20.00 22.50 25.00 30.00 35.00 40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 115.00 120.00 125.00 130.00 135.00 140.00 145.00 150.00 155.00 160.00 165.00 170.00 175.00 180.00 185.00 190.00], 2010-01-16:[22.50 25.00 30.00 35.00 40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 120.00 125.00 130.00 135.00 140.00 145.00 150.00 155.00 160.00 170.00 180.00 190.00 200.00 210.00 220.00 230.00 240.00 250.00 260.00 270.00 280.00 290.00 300.00 310.00 320.00 330.00 340.00 350.00 360.00 370.00 380.00 390.00 400.00], 2011-01-22:[20.00 30.00 40.00 50.00 60.00 70.00 80.00 85.00 90.00 95.00 100.00 110.00 120.00 125.00 130.00 140.00 150.00 160.00 170.00 180.00 190.00 200.00 210.00 220.00 230.00 240.00]], Updated: 1234155600}
// Output: OptionStrikesResponse{Strikes: [2009-02-20:[40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 115.00 120.00 125.00 130.00 135.00 140.00], 2009-03-20:[35.00 40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 115.00 120.00 125.00 130.00 135.00], 2009-04-17:[15.00 17.50 20.00 22.50 25.00 30.00 35.00 40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 115.00 120.00 125.00 130.00 135.00 140.00 145.00 150.00 155.00 160.00 165.00 170.00 175.00 180.00 185.00 190.00 195.00 200.00 210.00 220.00 230.00 240.00 250.00 260.00 270.00 280.00 290.00 300.00], 2009-07-17:[12.50 15.00 17.50 20.00 22.50 25.00 30.00 35.00 40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 115.00 120.00 125.00 130.00 135.00 140.00 145.00 150.00 155.00 160.00 165.00 170.00 175.00 180.00 185.00 190.00], 2010-01-15:[22.50 25.00 30.00 35.00 40.00 45.00 50.00 55.00 60.00 65.00 70.00 75.00 80.00 85.00 90.00 95.00 100.00 105.00 110.00 120.00 125.00 130.00 135.00 140.00 145.00 150.00 155.00 160.00 170.00 180.00 190.00 200.00 210.00 220.00 230.00 240.00 250.00 260.00 270.00 280.00 290.00 300.00 310.00 320.00 330.00 340.00 350.00 360.00 370.00 380.00 390.00 400.00], 2011-01-21:[20.00 30.00 40.00 50.00 60.00 70.00 80.00 85.00 90.00 95.00 100.00 110.00 120.00 125.00 130.00 140.00 150.00 160.00 170.00 180.00 190.00 200.00 210.00 220.00 230.00 240.00]], Updated: 1234155600}
}

0 comments on commit 8b2a4eb

Please sign in to comment.