Skip to content

Commit 7ccc7bc

Browse files
committed
chore: prepare v0.2.0 release
Bundles everything since v0.1.2 into a single v0.2.0 release (the v0.2.1 tag from the prior history has been dropped; the paginate fix and test-cleanup it would have carried are folded in here). Added: - Longbridge.QuoteContext.candlesticks_paginated/3 — paginated K-line fetch with dedup-by-timestamp and oldest-first ordering. Fixed: - mix credo --strict FunctionArity on paginate/9 — collapsed the loop-state args (acc, seen) into a single state map. - README cancel_order/2 example — pattern-match {:ok, map()} per @SPEC.
1 parent 15dbc19 commit 7ccc7bc

3 files changed

Lines changed: 28 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,30 @@ 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.0]
9+
10+
### Added
11+
12+
- **`Longbridge.QuoteContext.candlesticks_paginated/3`** — fetch up to N
13+
K-line bars across multiple `candlesticks/3` calls. Deduplicates by
14+
timestamp to avoid infinite loops when the API returns the same recent
15+
bars on every call (e.g. paper-trading accounts where the historical
16+
window is unavailable), and returns candles sorted oldest-first.
17+
Rate-limited by the SDK's connection-level throttle.
18+
19+
### Fixed
20+
21+
- **`mix credo --strict` `FunctionArity` finding**
22+
`Longbridge.QuoteContext.paginate/9` took 9 parameters, exceeding
23+
the max-8 limit and causing the strict Credo run to exit with rc=8.
24+
The two loop-state arguments (`acc`, `seen`) have been collapsed
25+
into a single `state` map, dropping the arity to 8. Public API is
26+
unchanged.
27+
- **README `Longbridge.TradeContext.cancel_order/2` example** — the
28+
install/quickstart snippet destructured the return as `:ok`; the
29+
function's `@spec` returns `{:ok, map()}`. The snippet now pattern-
30+
matches the actual tuple shape.
31+
832
## [0.1.2]
933

1034
### Changed
@@ -119,6 +143,8 @@ The SDK is feature-complete against the upstream protocol for the pinned
119143
- `Longbridge.TradeContext`: 95.9%.
120144
- `Longbridge.QuoteContext.RealtimeStore`: 100%.
121145

146+
[0.2.1]: https://github.com/gilbertwong96/longbridge/compare/v0.2.0...v0.2.1
147+
[0.2.0]: https://github.com/gilbertwong96/longbridge/compare/v0.1.2...v0.2.0
122148
[0.1.2]: https://github.com/gilbertwong96/longbridge/compare/v0.1.1...v0.1.2
123149
[0.1.1]: https://github.com/gilbertwong96/longbridge/compare/v0.1.0...v0.1.1
124150
[0.1.0]: https://github.com/gilbertwong96/longbridge/releases/tag/v0.1.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Add `longbridge` to your `mix.exs`:
1919
```elixir
2020
def deps do
2121
[
22-
{:longbridge, "~> 0.1.2"}
22+
{:longbridge, "~> 0.2.0"}
2323
]
2424
end
2525
```

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.1.2",
7+
version: "0.2.0",
88
elixir: "~> 1.20",
99
start_permanent: Mix.env() == :prod,
1010
package: package(),

0 commit comments

Comments
 (0)