Merge pull request #1 from blockworks-foundation/client_order_ids

Add makerClientOrderId and takerClientOrderId to perp_event table.
This commit is contained in:
Maximilian Schneider 2022-01-13 19:36:09 -08:00 committed by GitHub
commit f050e2f5ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 0 deletions

View File

@ -37,4 +37,10 @@ export default class PerpEvent {
@Column() @Column()
quantity: number; quantity: number;
@Column()
makerClientOrderId: string;
@Column()
takerClientOrderId: string;
} }

View File

@ -54,6 +54,15 @@ export class CreatePerpEvent1627606236070 implements MigrationInterface {
name: 'quantity', name: 'quantity',
type: 'decimal', type: 'decimal',
}, },
{
name: 'makerClientOrderId',
type: 'text',
},
{
name: 'takerClientOrderId',
type: 'text',
},
], ],
}), }),
true true

View File

@ -46,6 +46,8 @@ function formatFillEvents(address, fillEvents) {
takerOrderId: fillEvent.takerOrderId.toString(), takerOrderId: fillEvent.takerOrderId.toString(),
price: fillEvent.price, price: fillEvent.price,
quantity: fillEvent.quantity, quantity: fillEvent.quantity,
makerClientOrderId: fillEvent.makerClientOrderId.toString(),
takerClientOrderId: fillEvent.takerClientOrderId.toString(),
}; };
}); });
} }