Releases: tibs245/trading-ig-rust
Releases · tibs245/trading-ig-rust
v0.1.4
v0.1.3
Fixed
close_positionrejected withvalidation.null-not-allowed.request.
IG silently drops the body of realDELETErequests, so every
required field onClosePositionRequestwas reported as null. The
transport now mirrors the official Pythontrading-igclient and
rewrites body-carryingDELETEs asPOSTwith an_method: DELETE
header. Bodyless DELETEs (sessionlogout,watchlistsdelete,
workingordersdelete) are untouched. Validated live on a demo
account: position fully closed, expected P/L confirmed.- Defence in depth:
ClosePositionRequestnow carries
#[serde(skip_serializing_if = "Option::is_none")]on every optional
field, so explicitnulls never reach IG even if a future code path
bypasses the transport rewrite.
Added
examples/diag_close_position.rs— list open positions and close the
first, logging the outbound JSON. Handy when reproducing the
null-not-allowed bug or validating the rewrite against a fresh demo
account.tests/dealing_positions.rs::close_position_rewrites_delete_to_post_with_method_override
pins the rewrite + asserts the JSON body survives intact.tests/support/matchers::HasMethodOverrideand
IgMockServer::mount_delete_errorhelpers for tests that target
body-carrying DELETE endpoints.
v0.1.2
v0.1.1
Added
session().login_with_encryption()(behind theencryption
cargo feature) — log in v3 with an RSA-encrypted password instead
of plaintext. Recommended for accounts holding real funds (live or
funded demo). Internally fetches the encryption key, encrypts the
password with PKCS#1 v1.5, and posts to/sessionwith
encryptedPassword=true.SECURITY.md— vulnerability reporting policy (FR + EN),
maintainer contact email thibault.barske@kolombo.xyz, encryption
recommendation for funded accounts, defensive practices the crate
enforces.- README "Recommended for funded accounts" section pointing at the
new helper.
Fixed
Cargo.toml: corrected therepositoryURL to point at
tibs245/trading-ig-rust. Addedhomepageanddocumentation
metadata fields, and configured[package.metadata.docs.rs]so
docs.rs builds with all features.streaming::reconnectdoc comment: fix broken intra-doc link to
StreamingApi::connect_with.streaming::events::MarketUpdate::from_rawdoc comment: drop
intra-doc link to a privateMARKET_FIELDSconstant (was
cargo doc -D warningsfailure on Rust 1.95).- Two
Duration::from_secs(60)call sites updated to
Duration::from_mins(1)to satisfy Rust 1.95's new
clippy::duration_suboptimal_unitslint.
Security
- RUSTSEC-2023-0071 (
rsacrate Marvin timing side-channel on
PKCS#1 v1.5 decryption): acknowledged but not applicable to
this crate — we only ever encrypt with IG's public key, never
decrypt. Anignoreis documented indeny.tomland in the
cargo auditinvocations of both CI workflows. SeeSECURITY.md
for the full rationale. cargo denyis now wired into the weekly security workflow
(.github/workflows/audit.yml) — checks advisories, licenses,
banned crates, and source provenance.cargo auditis also added to thepre-pushgit hook (skipped if
the binary isn't installed locally; CI runs it unconditionally).