Created
April 19, 2018 10:14
-
-
Save dmdeklerk/e225ac81b16e64a17d4a592b4c626926 to your computer and use it in GitHub Desktop.
heat-sdk transactions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public placeBidOrder( | |
currencyId: string, | |
assetId: string, | |
quantity: string, | |
price: string, | |
expiration: number | |
) { | |
let builder = new Builder() | |
.isTestnet(this.config.isTestnet) | |
.attachment( | |
new ColoredCoinsBidOrderPlacement().init(currencyId, assetId, quantity, price, expiration) | |
) | |
.amountHQT("0") | |
.feeHQT("1000000") | |
return new Transaction(this, "0", builder) | |
} | |
public cancelAskOrder( | |
orderId: string | |
) { | |
let builder = new Builder() | |
.isTestnet(this.config.isTestnet) | |
.attachment( | |
new ColoredCoinsAskOrderCancellation().init(orderId) | |
) | |
.amountHQT("0") | |
.feeHQT("1000000") | |
return new Transaction(this, "0", builder) | |
} | |
public cancelBidOrder( | |
orderId: string | |
) { | |
let builder = new Builder() | |
.isTestnet(this.config.isTestnet) | |
.attachment( | |
new ColoredCoinsBidOrderCancellation().init(orderId) | |
) | |
.amountHQT("0") | |
.feeHQT("1000000") | |
return new Transaction(this, "0", builder) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment