Skip to content

Commit

Permalink
Merge pull request coinbase#45 from coinbase/bookbuilder-sync
Browse files Browse the repository at this point in the history
Handle new API feed messages
  • Loading branch information
CjS77 authored Oct 4, 2017
2 parents 89da99e + 904fdd5 commit 894ed2e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/exchanges/gdax/GDAXFeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,23 @@ export class GDAXFeed extends ExchangeFeed {
} as ErrorMessage;
this.emit('feed-error', msg);
return msg;
default:
case 'received':
return {
type: 'unknown',
time: new Date(),
sequence: (feedMessage as any).sequence,
productId: (feedMessage as any).product_id,
message: feedMessage
} as UnknownMessage;
default:
const product: string = (feedMessage as any).product_id;
return {
type: 'unknown',
time: new Date(),
sequence: this.getSequence(product),
productId: product,
message: feedMessage
} as UnknownMessage;
}
}

Expand Down

0 comments on commit 894ed2e

Please sign in to comment.