Skip to content

Commit

Permalink
order update
Browse files Browse the repository at this point in the history
  • Loading branch information
samanthatuhseng authored and alanwu4321 committed Aug 16, 2023
1 parent 2c47b23 commit b0099bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/exchanges/OrderlyPrivateClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ export class OrderlyPrivateClient extends BasicPrivateClient {
// order update
if (msg?.topic?.includes("executionreport")) {
if (msg.data) {
// https://docs-api.orderly.network/#restful-api-private-get-order
// https://docs-api.orderly.network/#restful-api-private-get-order
// _processsMessage {
// topic: 'executionreport',
// ts: 1691126463207,
Expand Down Expand Up @@ -346,8 +346,8 @@ export class OrderlyPrivateClient extends BasicPrivateClient {
const price = Number(d.avgPx || 0) || Number(d.px || 0);
const change = {
exchange: this.name,
pair: d.instId,
exchangeOrderId: d.ordId || d.algoId || d.clOrdId, // orderId
pair: d.symbol,
exchangeOrderId: d.orderId, // orderId
status: status,
event: event,
msg: status,
Expand All @@ -357,7 +357,7 @@ export class OrderlyPrivateClient extends BasicPrivateClient {
// Negative number represents the user transaction fee charged by the platform.
// Positive number represents rebate.
commissionAmount: -Number(d.fee || 0), // fee
commissionCurrency: d.feeCcy, // feeAsset
commissionCurrency: d.feeAsset, // feeAsset
} as Order;

this.emit("orders", change);
Expand Down

0 comments on commit b0099bf

Please sign in to comment.