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
Address NEC Amount ETH Amount Sent on L1 | |
0x55a3df57B7AAEC16a162fD5316f35bEC082821CF 688544.852 18.38652303 YES | |
0x34f1e87e890b5683EF7b011b16055113c7194C35 415103.5907 11.08469798 YES | |
0xB104241052a8D46893aB8E903d9d2Ce11FAaB5C5 269551.7561 7.19796184 YES | |
0x5c0AC266833E36E98edB52070bCeA5Be6C1145c6 179261.1312 4.786890654 YES | |
0xbC90B3Ce40fc3Ed921D910f3e046C65954fFF7cB 90673.02565 2.421282607 YES | |
0xd1a0931de7a002D0D47117404BcBB3443faFb618 44022.91369 1.175563675 YES | |
0x71344ADED219B25d7d33Aee358Ce12E60CAE83d0 37905.60424 1.012210407 YES | |
0xFD0436eF0cBf9198ec4c3837F5f2567DAC38D9b6 31450.14368 0.8398273392 YES | |
0xdFEa4755c067DfABAF0a18C88D226337874469aC 26497.10026 0.7075639921 YES |
The Trustless OTC smart contract is deployed at (0x62f49e904af170Ea377F399aCa76C13fF25a6F5E)[https://etherscan.io/address/0x62f49e904af170ea377f399aca76c13ff25a6f5e#code]
This contract allows trading of any tokens, between two counterparties without the need for a trusted escrow.
The instructions here assume the use of MyCrypto or a similar wallet to interact with the Ethereum blockchain.
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
// This example shows how to generate the signature from a raw private key | |
// Signing using hardware wallets such as Ledger or Trezor can be done using their documentation | |
const ethUtils = require('ethereumjs-utils') | |
const privKey = /* Your Private Key */ | |
const nonce = ((Date.now() / 1000) + 350) + '' | |
const hash = ethUtils.hashPersonalMessage(ethUtils.toBuffer(nonce.toString(16))) | |
const signature = ethUtils.ecsign(hash, privKey) |
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
const token = 'ZRX' | |
const amount = 15 | |
const response = await efx.contract.unlock(token, amount) | |
// If tokens are still locked for a longer time period, permission is required to unlock | |
// This permission can be requested from Ethfinex |
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
const sig = await efx.sign(parseInt(orderId).toString(16)) | |
const sigConcat = ethUtils.toRpcSig(sig.v, ethUtils.toBuffer(sig.r), ethUtils.toBuffer(sig.s)) | |
await efx.cancelOrder(parseInt(orderId), sigConcat) |
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
const ethUtils = require('ethereumjs-utils') | |
const privKey = /* Your Private Key */ | |
const nonce = ((Date.now() / 1000) + 10800) + '' | |
const hash = ethUtils.hashPersonalMessage(ethUtils.toBuffer(nonce.toString(16))) | |
const signature = ethUtils.ecsign(hash, privKey) | |
// Get all open orders | |
const openOrders = await efx.getOrders(null, null, nonce, signature) |
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
// Get all open orders | |
const openOrders = await efx.getOrders() | |
// Get all historical orders | |
const historicalOrders = await efx.getOrderHist() |
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
const symbol = 'ZRXETH' | |
const amount = -15 | |
const price = 0.0025 | |
const orderId = await efx.submitOrder(symbol, amount, price) |
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
const BFX = require('bitfinex-api-node') | |
const { Order } = require('./node_modules/bitfinex-api-node/lib/models') | |
const bfx = new BFX({ | |
apiKey: '', | |
apiSecret: '', | |
ws: { | |
autoReconnect: true, | |
seqAudit: false, |
NewerOlder