Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump version -> 1.0.3 #182

Merged
merged 1 commit into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ibapi"
version = "1.0.2"
version = "1.0.3"
edition = "2021"
authors = ["Wil Boayue <[email protected]>"]
description = "A Rust implementation of the Interactive Brokers TWS API, providing a reliable and user friendly interface for TWS and IB Gateway. Designed with a focus on simplicity and performance."
Expand Down
15 changes: 2 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,7 @@ The [Client documentation](https://docs.rs/ibapi/latest/ibapi/struct.Client.html

## Install

Run the following Cargo command in your project directory:

```bash
cargo add ibapi
```

Or add the following line to your `Cargo.toml`:

```toml
ibapi = "1.0.0"
```
> **Note**: Check [crates.io/crates/ibapi](https://crates.io/crates/ibapi) for the latest available version.
Check [crates.io/crates/ibapi](https://crates.io/crates/ibapi) for the latest available version and installation instructions.

## Examples

Expand Down Expand Up @@ -245,7 +234,7 @@ fn main() {
});
handles.push(handle);
}

handles.into_iter().for_each(|handle| handle.join().unwrap());
}
```
Expand Down
2 changes: 2 additions & 0 deletions src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub enum Error {
Parse(usize, String, String),
ServerVersion(i32, i32, String),
Simple(String),
InvalidArgument(String),
ConnectionFailed,
ConnectionReset,
Cancelled,
Expand Down Expand Up @@ -49,6 +50,7 @@ impl std::fmt::Display for Error {
Error::UnexpectedEndOfStream => write!(f, "UnexpectedEndOfStream"),

Error::Simple(ref err) => write!(f, "error occurred: {err}"),
Error::InvalidArgument(ref err) => write!(f, "InvalidArgument: {err}"),
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/market_data/historical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,10 @@ pub(crate) fn historical_data(
)?;
}

if end_date.is_some() && what_to_show == Some(WhatToShow::AdjustedLast) {
return Err(Error::InvalidArgument("end_date must be None when requesting WhatToShow::AdjustedLast. You might have called Client::historical_data with WhatToShow::AdjustedLast".into()));
}

loop {
let request_id = client.next_request_id();
let request = encoders::encode_request_historical_data(
Expand Down
Loading