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

exchanges/wrappers: shift bespoke fetch ticker, orderbook and accountinfo #1440

Open
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

shazbert
Copy link
Collaborator

@shazbert shazbert commented Jan 4, 2024

PR Description

This PR stops potential error obfuscation. The problem is ongoing in batch operations. So you may have a misconfigured pair which will not be present in memory, the entire batch is loaded but that error forces an update slowing everything down, which will occur over and over again.

  • Moves FetchAccountInfo,FetchOrderbook,FetchTicker to exchange.go as base methods.

Fixes # (issue)

Type of change

Please delete options that are not relevant and add an x in [] as item is complete.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration and
also consider improving test coverage whilst working on a certain feature or package.

  • go test ./... -race
  • golangci-lint run
  • Test X

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation and regenerated documentation via the documentation tool
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally and on Github Actions with my changes
  • Any dependent changes have been merged and published in downstream modules

@shazbert shazbert requested a review from a team January 4, 2024 03:40
@shazbert shazbert self-assigned this Jan 4, 2024
@shazbert shazbert added review me This pull request is ready for review and removed blocked labels Jan 4, 2024
@shazbert shazbert removed the review me This pull request is ready for review label Jan 17, 2024
@shazbert shazbert added review me This pull request is ready for review and removed rebase/merge of master required labels Jan 29, 2024
Copy link
Collaborator

@gloriousCode gloriousCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm on board with the simplification. There are a few tests that aren't needed that call the newly moved Base functions eg Binanceus TestFetchAccountInfo

engine/helpers.go Outdated Show resolved Hide resolved
exchanges/exchange.go Show resolved Hide resolved
@gloriousCode
Copy link
Collaborator

Tests are showing issue in retrieving the orderbook and ticker. Something I can replicate:

--- PASS: TestAllExchangeWrappers/bitstamp_wrapper_tests/PRIORITY_GROUP/UpdateTickers-spot-ETH-TEST-DELIM-usdt (0.00s)

  exchange_wrapper_standards_test.go:248: Bitstamp Func 'FetchTicker' Error: 'no ticker found bitstamp ETH-TEST-DELIM-usdt spot'. Inputs: [context.Background ETH-TEST-DELIM-usdt spot].
            --- FAIL: TestAllExchangeWrappers/bitstamp_wrapper_tests/SECONDARY_GROUP/FetchTicker-spot-ETH-TEST-DELIM-usdt (0.00s)

@gloriousCode gloriousCode removed the review me This pull request is ready for review label Mar 7, 2024
@shazbert shazbert added the review me This pull request is ready for review label Mar 7, 2024
Copy link
Collaborator

@gloriousCode gloriousCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making those changes! Looks like this pr continues to open 🥫 🪱

@gloriousCode gloriousCode removed the review me This pull request is ready for review label Mar 8, 2024
@shazbert shazbert added the reconstructing Based on PR feedback, this is currently being reworked and is not to be merged label May 1, 2024
@shazbert shazbert requested a review from gloriousCode May 1, 2024 03:38
@shazbert shazbert added review me This pull request is ready for review medium priority and removed reconstructing Based on PR feedback, this is currently being reworked and is not to be merged labels May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug medium priority review me This pull request is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants