Skip to content

Commit 51bfad7

Browse files
committed
chore: prepare v0.2.1 release
1 parent 1a45a4e commit 51bfad7

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,28 @@ All notable changes to this project are documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.2.1]
9+
10+
### Fixed
11+
12+
- **Reconnect after an idle timeout no longer uses a stale OTP** — the
13+
one-time password was previously written over `config.token`, so
14+
reconnects reused the spent OTP and failed auth (status 5), and the
15+
follow-up token refresh failed with 401 as well. The OTP now lives in
16+
a separate `socket_token` field and is re-derived on every connect.
17+
- **`order_type` atoms map to the Longbridge enum names** (`:lo`
18+
`"LO"`, `:elo``"ELO"`, `:market``"MO"`, ...) instead of being
19+
camelized, so typed order submission sends the correct wire values.
20+
- **HTTP POST/PUT requests send `Content-Type: application/json`**
21+
the server ignored JSON bodies without the header, breaking order
22+
placement and other write endpoints.
23+
- **`order_changed` push events are decoded from the real server
24+
format** (topic `private`, `event`/`data` wrapper) — `on_order_changed`
25+
callbacks now receive the order payload itself.
26+
- **Stopping a `TradeContext` or `QuoteContext` also stops its WebSocket
27+
connection** — previously the connection kept reconnecting in the
28+
background after the context process exited.
29+
830
## [0.2.0]
931

1032
### Added

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Longbridge.MixProject do
44
def project do
55
[
66
app: :longbridge,
7-
version: "0.2.0",
7+
version: "0.2.1",
88
elixir: "~> 1.20",
99
start_permanent: Mix.env() == :prod,
1010
package: package(),

0 commit comments

Comments
 (0)