Skip to content

Conversation

dboyliao
Copy link
Collaborator

@dboyliao dboyliao commented Mar 8, 2025

  1. update .SubmitOrder logic, to simplify the streaming handlers logic
    • Do not support limit order with funds
    • Only support stop limit order (via stop order on Coinbase Exchange) at long position .
  2. By 1., update order-related event handlers accordingly.

@dboyliao dboyliao force-pushed the dboy/coinbase-stream-fix-2 branch from d89e623 to cb56fbf Compare March 9, 2025 03:22
@dboyliao dboyliao force-pushed the dboy/coinbase-stream-fix branch from 2f1e02b to 318d4c5 Compare March 9, 2025 03:22
@dboyliao dboyliao changed the title WIP: [coinbase] stream fix 2 FIX: [coinbase] minor refactoring and fix order-related streaming event handling Mar 9, 2025
@dboyliao dboyliao marked this pull request as ready for review March 9, 2025 03:25
@dboyliao dboyliao changed the title FIX: [coinbase] minor refactoring and fix order-related streaming event handling FIX: [coinbase] refactoring and fix order-related streaming event handling Mar 10, 2025
@dboyliao dboyliao force-pushed the dboy/coinbase-stream-fix-2 branch from d39c50c to b5a8b58 Compare March 10, 2025 09:49
accountsStr := os.Getenv("COINBASE_ACCOUNT_IDS")
accounts := strings.Split(accountsStr, ",")

c := make(chan bool)
Copy link
Owner

Choose a reason for hiding this comment

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

you can use make(chan struct[}) and send c <- struct{}{}

@dboyliao dboyliao force-pushed the dboy/coinbase-stream-fix-2 branch from 40dc4bc to 5a99df6 Compare March 10, 2025 11:36
@dboyliao dboyliao force-pushed the dboy/coinbase-stream-fix branch from 062dbce to 5b615ac Compare March 10, 2025 11:37
Base automatically changed from dboy/coinbase-stream-fix to main March 10, 2025 12:01
@dboyliao dboyliao force-pushed the dboy/coinbase-stream-fix-2 branch 2 times, most recently from 51b30a9 to cf4f5ca Compare March 11, 2025 05:34
triggered = true
assert.NotNil(t, m)
// t.Logf("get ticker message: %v", *m)
c <- *m
Copy link
Owner

Choose a reason for hiding this comment

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

select {
case c <- m:
default:
}

select {
case c <- *m:
}

@dboyliao dboyliao force-pushed the dboy/coinbase-stream-fix-2 branch from eb91fff to 52856b3 Compare March 11, 2025 10:31
@dboyliao dboyliao force-pushed the dboy/coinbase-stream-fix-2 branch from 450ccc2 to 0fc858a Compare March 11, 2025 23:32
@dboyliao dboyliao merged commit bca88f2 into main Mar 12, 2025
3 checks passed
@dboyliao dboyliao deleted the dboy/coinbase-stream-fix-2 branch March 12, 2025 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants