Commit Graph

1770 Commits

Author SHA1 Message Date
dependabot[bot]
048c4b0f0c build(deps): bump bufbuild/buf-setup-action from 1.22.0 to 1.23.1 (#1247)
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.22.0 to 1.23.1.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.22.0...v1.23.1)

---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-03 17:01:42 +10:00
dependabot[bot]
65d318df98 build(deps): bump github.com/d5/tengo/v2 from 2.16.0 to 2.16.1 (#1248)
Bumps [github.com/d5/tengo/v2](https://github.com/d5/tengo) from 2.16.0 to 2.16.1.
- [Release notes](https://github.com/d5/tengo/releases)
- [Changelog](https://github.com/d5/tengo/blob/master/.goreleaser.yml)
- [Commits](https://github.com/d5/tengo/compare/v2.16.0...v2.16.1)

---
updated-dependencies:
- dependency-name: github.com/d5/tengo/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-03 17:00:21 +10:00
dependabot[bot]
e4dc87c175 build(deps): bump google.golang.org/protobuf from 1.30.0 to 1.31.0 (#1249)
Bumps google.golang.org/protobuf from 1.30.0 to 1.31.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-03 16:59:35 +10:00
Scott
fcc5ad4551 exchanges/qa: Add exchange wrapper testing suite (#1159)
* initial concept of a nice validation tester for exchanges

* adds some datahandler design

* expand testing

* more tests and fixes

* minor end of day fix for bithumb

* fixes implementation issues

* more test coverage and improvements, but not sure if i should continue

* fix more wrapper implementations

* adds error type, more fixes

* changes signature, fixes implementations

* fixes more wrapper implementations

* one more bit

* more cleanup

* WOW things work?

* lintle 1/1337

* mini bump

* fixes all linting

* neaten

* GetOrderInfo+ asset pair fixes+improvements

* adds new websocket test

* expand ws testing

* fix bug, expand tests, improve implementation

* code coverage of a lot of new codes

* fixes everything

* reverts accidental changes

* minor fixes from reviewing code

* removes Bitfinex cancelBatchOrder implementation

* fixes dumb baby typo for babies

* mini nit fixes

* so many nits to address

* addresses all the nits

* Titlecase

* switcheroo

* removes websocket testing for now

* fix appveyor, minor test fix

* fixes typo, re-kindles killed kode

* skip binance wrapper tests when running CI

* expired context, huobi okx fixes

* kodespull

* fix ordering

* time fix because why not

* fix exmo, others

* hopefully this fixes all of my life's problems

* last thing today

* huobi, more like hypotrophy

* golangci-lint, more like mypooroldknee-splint

* fix huobi times by removing them

* should fix okx currency issues

* blocks the application

* adds last little contingency for pairs

* addresses most nits and new problems

* lovely fixed before seeing why okx sucks

* fixes issues with okx websocket

* the classic receieieivaier

* lintle

* adds test and fixes existing tests

* expands error handling messages during setup

* fixes dumb okx bugs introduced

* quick fix for lint and exmo

* fixes nixes

* fix exmo deposit issue

* lint

* fixes issue with extra asset runs missing

* fix surprise race

* all the lint and merge fixes

* fixes surprise bugs in OKx

* fixes issues with times and chains

* fixing all the merge stuff

* merge fix

* rm logs and a panic potential

* lovely lint lament

* an easy demonstration of scenario, but not of initial purpose

* put it in the bin

* Revert "put it in the bin"

This reverts commit 15c6490f713233d43f10957367fcbf18e3818bdd.

* re-add after immediate error popup

* fix mini poor test design

* okx okay

* merge fixes

* fixes issues discovered in lovely test

* I FORGOT TO COMMIT THIS

* nit fixaroonaboo

* forgoetten test fix

* revert old okx asset intrument work

* fixes

* revert problems I didnt understand. update bybit

* fix merge bugs

* test cleanup

* further improvements

* reshuffle and lint

* rm redundant CI_TEST by rm the CI_TEST field that is redundant

* path fix

* move to its own section, dont run on 32 bit + appveyor

* lint

* fix lbank

* address nits

* let it rip

* fix failing test time range

* niteroo boogaloo

* mod tidy, use common.SimpleTimeFormat
2023-07-03 11:09:43 +10:00
Ryan O'Hara-Reid
ef605a3c19 okx: Add fee fields for USDC pairs (#1244)
* okx: Add USDC quoted maker/taker fees

* thrasher: nits

* fix spelling

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2023-06-29 17:19:05 +10:00
dependabot[bot]
16d769a851 build(deps): bump google.golang.org/grpc from 1.56.0 to 1.56.1 (#1241)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.56.0 to 1.56.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.56.0...v1.56.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-26 20:55:37 +10:00
dependabot[bot]
d4ac4d244a build(deps): bump bufbuild/buf-setup-action from 1.21.0 to 1.22.0 (#1242)
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.21.0 to 1.22.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.21.0...v1.22.0)

---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-26 20:51:00 +10:00
TaltaM
db7441c723 dispatch: channel reuse fix (#1237)
* Add test for dispatch channel reuse

* Dispatcher - make chans bidirectional

* No need to to keep the type assertion separate from the Get()

* Unexport Pipe's channel and add getter
2023-06-21 12:33:40 +10:00
Gareth Kirwan
97804a79da Orders: Fix ClientOrderID not updated in merge (#1235) 2023-06-20 09:56:58 +10:00
dependabot[bot]
c957d04f88 build(deps): bump github.com/urfave/cli/v2 from 2.25.5 to 2.25.7 (#1234)
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.25.5 to 2.25.7.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.25.5...v2.25.7)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-19 16:36:11 +10:00
dependabot[bot]
d877d49c99 build(deps): bump golang.org/x/net from 0.10.0 to 0.11.0 (#1232)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.11.0.
- [Commits](https://github.com/golang/net/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-19 16:22:57 +10:00
dependabot[bot]
44558e2962 build(deps): bump google.golang.org/grpc from 1.55.0 to 1.56.0 (#1233)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.55.0 to 1.56.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.55.0...v1.56.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-19 16:07:39 +10:00
Ryan O'Hara-Reid
17cefe6956 okx: GetDefaultConfig fix & ticker field improvements (#1227)
* okx: updaterooo (cherry pick)

* okx: add in target currency handling in spot market orders

* okx:don't adjust order.Submit variables.

* spell checker

* okx_wrapper: updateTradablePairs true bool

* thrasher: nits

* purge default env vars

* point to CI env var

* print out environment

* lol

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2023-06-19 15:58:58 +10:00
Ryan O'Hara-Reid
92839ebaa2 currency: Add Pair method IsAssociated (#1230)
* currency: pair method add IsAssociated()

* Add pair into Order params, export error

* glorious: nits

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2023-06-16 12:34:44 +10:00
Ryan O'Hara-Reid
981a08af83 bybit: assortment of updates (#1192)
* bybit: cherry-pickable

* bybit: implement fee fetching v5

* bybit: update to use nullable type

* bybit: fix some tests

* bybit: spell check fix

* remove redunant asset dec, and rm output

* rm comment code

* linter: fixerinos woooo

* bybit: constrict rate limit on public spot to v5

* exchanges/bybit/limits: update (CHERRY PICK ME)

* glorious: nIIIIIIIIIIIIIIITS

* glorious: nits continued

* updated comment

* update even more

* RM LINE!

* glorious: nits

* Update exchanges/sharedtestvalues/sharedtestvalues.go

Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>

* fix

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
2023-06-16 12:27:34 +10:00
Scott
698b6716ea okx: REST orderbook depth fix (#1228)
* orderbook depth fix

* more data, more power

* fx splln misteaks
2023-06-15 10:19:44 +10:00
Gareth Kirwan
1f89048ddb Okx: Fix Instrument unmarshal (#1225)
* Okx: Fix Instrument unmarshal

This fixes: `json: invalid use of ,string struct tag, trying to unmarshal "" into float64`
when TwapSz or other fields are empty, which happened briefly today.

As a DriveBy it also simplifies the exposed Instrument type to native
types only.

* Okx: Add missing InstrumentFamily to Instrument

* Okx: Add Instrument Unmarshal tests

DriveBy: Removes stray newline in type conversions

* Okx: Fix empty line upsetting linter
2023-06-13 15:27:01 +10:00
dependabot[bot]
d6f0f6243a build(deps): bump bufbuild/buf-setup-action from 1.20.0 to 1.21.0 (#1224)
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.20.0 to 1.21.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.20.0...v1.21.0)

---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 09:46:49 +10:00
Gareth Kirwan
466327cdaa orders: Fix manager not processing immediately (#1193)
* orders: Fix manager not processing immediately

This ensures that orders are processed as soon as orderManager claims to have started.

Specifically this will fix an eager call to CancelAllOrders not finding
anything until after the first Interval run.

* orders: Fix reset timer call

This fix is small niggle.
The existing code was more complicated than it needed to be, whilst also
ignoring the return of timer.Reset and the conditional need to drain the
channel. It's unlikely but possible during transient resource
starvation.

* OrderManager: Simplify startup process

This simplifies the sequence and Adds to the wg first.
We won't bail from the run() during any type of processOrders, and
that's something we can fix later
2023-06-09 11:39:07 +10:00
Scott
c8537c47a2 OKx: Fix websocket subscriptions and casing (#1221)
* FIX UPPER CASE ASSET PROBLEM

* JUDAS

* FIX SUB APPENDING

* linter got me

* ran, tested, linted, fixed

* comment
2023-06-09 11:35:06 +10:00
Ryan O'Hara-Reid
9e4ea6c62b currency: Add OrderParameters helpers for currency pair (#1217)
* currency: Add order aspect from pair helper method.

* Update currency/pair_methods.go

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>

* Update currency/pair_types.go

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>

* glorious: nits

* glorious: nit cont. rm pair field and used IsPopulated method instead of IsEmpty

* thrasher: nits

* ch test name

* glorious: nits

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
2023-06-09 10:07:04 +10:00
TaltaM
a024ad53ae websocket: Check for slice size to avoid panic when classifying empty binary message (#1219)
* Check for slice size to avoid panic when classifying empty resp

* Simplify according to suggestion
2023-06-09 09:24:33 +10:00
Gareth Kirwan
bb449c2085 Binance: Fix WorkingTime breaking executionReport (#1218)
This new field was added in the 2022-12-05 updates.
It's not always in an execution report, but only if isWorking=true
2023-06-06 11:26:13 +10:00
dependabot[bot]
bfe0be0ff2 build(deps): bump github.com/spf13/viper from 1.15.0 to 1.16.0 (#1215)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.15.0...v1.16.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 17:25:17 +10:00
dependabot[bot]
dcb66aab56 build(deps): bump github.com/grpc-ecosystem/grpc-gateway/v2 (#1212)
Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.15.2 to 2.16.0.
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.15.2...v2.16.0)

---
updated-dependencies:
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 17:10:07 +10:00
dependabot[bot]
81f53ba9c8 build(deps): bump github.com/mattn/go-sqlite3 from 1.14.16 to 1.14.17 (#1213)
Bumps [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) from 1.14.16 to 1.14.17.
- [Release notes](https://github.com/mattn/go-sqlite3/releases)
- [Commits](https://github.com/mattn/go-sqlite3/compare/v1.14.16...v1.14.17)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-sqlite3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 16:44:24 +10:00
dependabot[bot]
97869f494f build(deps): bump github.com/urfave/cli/v2 from 2.25.4 to 2.25.5 (#1214)
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.25.4 to 2.25.5.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.25.4...v2.25.5)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 16:22:10 +10:00
dependabot[bot]
42238b03b9 build(deps): bump bufbuild/buf-setup-action from 1.19.0 to 1.20.0 (#1216)
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.19.0 to 1.20.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.19.0...v1.20.0)

---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 16:20:45 +10:00
Ryan O'Hara-Reid
d086c45b0a Bitfinex: filter security asset type from spot trading pairs (#1191)
* bitfinex: filter security pairs from spot trading

* asset: add securities type

* bitfinex: remove print

* linter: fix

* gomod tidy

* glorious: nits

* bitfinex: just some orderbook fun and added a pass through for bitfinex funding rate when rate == 0

* bitfinex: move update function from testmain to localised test

* test: fix up

* glorious:nits

* bitfinex; fix casing test

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2023-06-05 11:53:07 +10:00
Gareth Kirwan
86a540173d websocket: Fix redundant connection monitor error upon disconnect (#1210)
When an existing ws disconnects the connection manager goro will call Connect.
This prevents Connect trying to start another connection manager if it's
already running
2023-06-05 11:51:43 +10:00
Adrian Gallagher
400bcb6b56 telegram: Fix pushing events to an authorised client list (#1208)
* fix_communications_authorised_clients

* Telegram: Link config to authorised clients list

* Telegram: Prevent multiple spam messages from unauthed user

* Telegram: Improve command handling for authenticated users

Telegram doesn't allow you to easily fetch the user ID of a user unless they have previously sent you a message and is currently waiting to be processed, or if they message you on the fly once the bot is connected. This ensures that the user ID is stored for future usage upon a single successful auth command.

It also fixes the offset as the previous code wouldn't be able to process incoming messages once connected and instead only relay them.

* Bump docs

* default to UTC time in case bot is run on a server with diff time zones

* Enhance config for already upgraded configs

---------

Co-authored-by: shanhuhai5739 <shanhu5739@gmail.com>
2023-06-05 10:37:13 +10:00
Samuael A
3eac6d12bd exchanges: Update GateIO exchange to V4 (#1058)
* Adding Public Endpoints and test functions

* Adding public endpoints and test functions

* Adding private spot endpoints

* Adding private endpoints and corresponding tests for margin

* Adding Margin Private endpoints

* Adding cross margin and flash swap endpoints

* Adding futures private endpoints

* Adding futures private endpoints and corresponding tests

* Adding Options and SubAccount endpoints and their unit tests

* Adding Wrapper functions

* Complete wrapper functions and corresponding unit test functions

* Fixing wrapper issues and adding websocket functions

* Update of Spot websocket and adding futures websocket handlers

* completed futures WS push data endpoints

* Completed Options websocket endpoints

* Adding websocket support for delivery futures and slight update on endpoint funcs

* Added Delivery websocket support and fix linter issues

* Update on Unit tests

* fix slight currency format error

* Fix slight endpoint tempos

* Update on conditional statements and unit tests issues

* fixing slight tempos

* Slight model and websocket data push method change

* Fix unit test tempos and updating models

* Fix on code structures and update on unit tests

* Slight code fix

* Remove print statements

* Update on tradable pairs fetch eps

* Fix websocket tempos

* Adding types to websocket routine manager

* Fix slight issues

* Slight fixes

* Updating wrapper funcs and models

* Slight update

* Update on test

* Update on tradable pairs

* update conditional statements

* Fixing slight issues

* Updating unit tests

* Minor fixes depending review comments

* Remove redundant method declaration

* Adding missing intervals

* Updating fetch tradable pairs

* update tradable pairs issues

* Addressing small tempos

* Slight fix on ticker

* Minor Fixes

* Minor review comment fixes

* Unit test and minor code updates

* Slight code updates

* Minor updates depending review comments

* Fixes

* Updating incoming message matcher

* Fix missing merge issue

* Fix minor wrapper issues

* Updating ratelimit and other issues

* Updating endpoint models and adding missing eps

* Update on code structure and models

* Minor codespell fixes

* Minor update on models

* fix unit test panic

* Minor race fix

* Fix issues in generating signature and unit tests

* Minor update on wrapper and unit tests

* Minor fix on wrapper

* Mini linter issues fix

* Minor fix

* endpoint fixes and slight update

* Minor fixes

* Updating exchange functions and unit tests

* Unit test and wrapper updates

* Remove options candlestick support

* Minor unit test and wrapper fix

* Unit test update

* minor fix on unit test and wrapper

* endpoints constants name change

* Add minor wrapper issues

* endpoint constants update

* endpoint url updates

* Updating subscriptions

* fixing dual mode endpoint methods

* minor fix

* rm small tempo

* Update on websocket orderbook handling

* Orderbook and currency pair update

* fix linter and test issues

* minor helper function update

* Fix wrapper coverage and wrapper issues

* delete unused variables

* Minor fix on ReadData() call

* separating websocket handlers

* separating websocket handlers

* Minor fix on enabled pair

* minor fix

* check instrument availability in spot

* create a separate subscriber for sake of multiple websocket connection

* linter fix

* minor websocket and gateio endpoints fix

* fix nil pointer exception

* minor fixes

* spelling fix decerializes -> deserializes

* fix Bitfinex unit test issues

* minor unknown currency pair labling fix

* minor currency pair handling fix

* slight update on GetDepositAddress wrapper unit test

* setting max request job to 200

* fixing numerical and timestamp type convert

* fix value overflow error

* change method of parsing orderbook price

* unifying timestamp conversion types to gateioTime

---------

Co-authored-by: Samuael Adnew <samuaelad@Samuaels-MacBook-Air.local>
2023-05-30 14:03:53 +10:00
dependabot[bot]
d6bff305c7 build(deps): bump github.com/urfave/cli/v2 from 2.25.3 to 2.25.4 (#1207)
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.25.3 to 2.25.4.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.25.3...v2.25.4)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-30 10:09:58 +10:00
dependabot[bot]
9bb7361fab build(deps): bump bufbuild/buf-setup-action from 1.18.0 to 1.19.0 (#1205)
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.18.0 to 1.19.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.18.0...v1.19.0)

---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 09:20:52 +10:00
Gareth Kirwan
0ecd082254 wsManager: Fix IsRunning true before flushed (#1201)
* Engine: Expose WebsocketRoutineManager

Without exposing the manager users don't know when it's ready to use.

* wsManager: Remove duplicate shutdown chan make

The shutdown channel was already in setup.
Consumers could reasonably expect it to not be replaced in between the
two, and it's not really part of Start to assign it.

* wsManager: Fix IsRunning true before flushed

Consumers must be able to tell when it's safe to start new
subscriptions. Before this fix any new subscriptions would get unsubbed
as part of the flush during `websocketRoutine`.

* WSM: Fix Stop/Start/Stop failing

We previously removed the shutdown channel from Start to avoid duplicate
allocation.
However that will result in a closed channel after the first Stop
So it's better to remove it from the setup.
It's private anyway.

* WSM: Export WebsocketRoutineManager type
2023-05-23 09:19:28 +10:00
Gareth Kirwan
d4e7736bf7 Okx: Fix ping handler (#1203)
Ping handler for okx is not the RFC compat version gorilla would
support. Even if it was, I think the UseGorillaHandler is
broken/misconceived because it does not send keepalive pings, it responds to them.

This also increases the delay to 27, in keeping with the 30 second
timeout documented.

I think this issue was hidden by the noisy default subs.
When just using funding-rates, it showed straight away.
2023-05-18 13:52:06 +10:00
Gareth Kirwan
234287307d Okx: Fix GetFundingRateHistory limit (#1204)
Fix limit of 100 rejected
Allow a limit of 0 for using the default value of limit (currently 100).
2023-05-18 12:17:52 +10:00
Gareth Kirwan
4095bc9133 Okx: Fix websocket fundingRate sub not sending instId (#1200)
instId is a required API field
2023-05-16 17:34:28 +10:00
Adrian Gallagher
b2eb030578 OKX: Update to new savings module (#1195)
* OKX: Update to new savings module

* Update exchanges/okx/okx_types.go

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>

---------

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
2023-05-16 14:55:07 +10:00
dependabot[bot]
f051118724 build(deps): bump golang.org/x/crypto from 0.8.0 to 0.9.0 (#1198)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.8.0 to 0.9.0.
- [Commits](https://github.com/golang/crypto/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-15 16:37:10 +10:00
Gareth Kirwan
6464a8a7e0 Binance: Fix exchange order limits not populating (#1187)
* Binance: Fix Exchange Order Limits not populating

The order of the filters cannot be trusted. New filters have been added
after the 2nd filter, breaking all filter passing afterwards.

This adds a basic test that the data is being populated, but more could
be done on testing.

We should have stricter typing on the filters, perhaps by unmarshalling into
json.RawMessage initially and then into typed stuct fields based on the
filterType. Finally we should spot both missing and unhandled filters, at least in
tests.

* Binance: Add TODO for unhandled filterTypes
2023-05-12 17:20:01 +10:00
Ryan O'Hara-Reid
8309ddf80c orders: Add AdjustBaseAmount (#1181)
* orders: Add AdjustBaseAmount method that alerts if non-fatal change occurs exchange side, adjust BTCM

* glorious: nits

* glorious: nits

* thrasher: nits

* Update exchanges/btcmarkets/btcmarkets_wrapper.go

Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>

* Update exchanges/btcmarkets/btcmarkets_wrapper.go

Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>

* thrasher: nits and whoopsie

* orders_test: fix

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
2023-05-12 14:06:04 +10:00
Ryan O'Hara-Reid
db8735ec99 log: Add structured logging (#1171)
* basic implementation

* log: deprecate duplicate function, add tests and refine calls.

* linter: fixes

* linter: update struct

* linter and new type

* log tests: update to not lint issue

* linter: stop complaining please

* glorious: nits

* log: rm comment code

* glorious: nits

* glorious: nits

* glorious: nits

* glorious: nits missed

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2023-05-10 17:52:53 +10:00
Gareth Kirwan
6e1cbfc31e OKX: Support exchange order limits (#1186)
* OKX: Support exchange order limits

Adds support for PriceStepIncrementSize and MinAmount limits

* OKX: Test UpdateOrderExecutionLimits on all assets

* OKX: Added asset types for order limit tests
2023-05-09 10:59:09 +10:00
Gareth Kirwan
970f65ba72 OKX: Fix balance using funding account (#1175)
It looks like this was an oversight.
No other exchange uses the funding account for balance and it wouldn't
make sense.
Again, this aims to be minimally invasive and backwards compatible, so
GetBalance is left alone to preserve compat.
2023-05-09 10:49:23 +10:00
Ryan O'Hara-Reid
616b45ae14 exmo: refactor UpdateTickers function (#1180)
* exmo: filter pairs that are not currently enabled by last update time

* stop filtering, add tests to qualify all deployable can be retrieved

* glorious: nits

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2023-05-09 10:17:15 +10:00
Ryan O'Hara-Reid
2d2d115ac9 hitbtc: optimise fetching tradable pairs and tickers (#1184)
* hitbtc: fix and optimise tradable pairs and tickers fetching

* Update exchanges/hitbtc/hitbtc_test.go

Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>

* Update exchanges/hitbtc/hitbtc_test.go

Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>

* thrasher: nits

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
2023-05-09 10:09:24 +10:00
dependabot[bot]
ef3337deee build(deps): bump google.golang.org/grpc from 1.54.0 to 1.55.0 (#1188)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.54.0 to 1.55.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.54.0...v1.55.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-08 17:33:01 +10:00
Ryan O'Hara-Reid
22fd3562b2 kraken: when fetching tradable pairs filter by status (#1183)
* kraken: when fetching tradable pairs filter by status

* linter/nits: fixed

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
2023-05-08 17:31:58 +10:00
dependabot[bot]
26edb59f6b build(deps): bump github.com/urfave/cli/v2 from 2.25.2 to 2.25.3 (#1189)
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.25.2 to 2.25.3.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.25.2...v2.25.3)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-08 16:59:45 +10:00