0

I want to send out 2 signed orders. I am pulling the orderBook to check for the orders and have them accessible for use. This is the way I am doing the order and signing it. The issue is that I have been doing it since July and for some reason on August 16th the orders stopped showing up on this endpoint. All kinds of help will be much appreciated

  const ETHvToDAIOrder = await new protocolUtils.LimitOrder({
    makerToken: _takerTokenAddress,
    takerToken: _makerTokenAddress,
    makerAmount: ETHvToDAIMakerAmountBN,
    takerAmount: ETHvToDAITakerAmountBN,
    maker: botConfig.makerAddress,
    taker: NULL_ADDRESS,
    expiry: expiryTimeBN.toString(),
    salt: saltBN.toString(),
    chainId: botConfig.CHAIN_ID,
  });

  // sign the ETHvToDAI order
  signature = await ETHvToDAIOrder.getSignatureWithKey(privateKey);
  const signedETHvToDAIOrder = { ...ETHvToDAIOrder, signature };```

1 Answer 1

1

I'm unable to reproduce your issue. Could you please share more details about your API call?

Your issue is with the /sra/v4/orderbook endpoint, correct? Do you API calls return any error messages?

4
  • Hello Megan, thanks for the response! Yes, you are right my problem is with /sra/v4/orderbook. I know that orders are going through because I can see them in the /sra/v4/orders endpoint. API calls pass without any errors. I can not figure out what happend to the orderbook endpoint since it just stopped working for me.
    – Nikoloz
    Sep 3, 2021 at 20:10
  • This is the snippet of the POST order const responseDE = await fetch("https://api.0x.org/sra/v4/orders", { method: "POST", body: JSON.stringify(signedOrders), headers: { "Content-Type": "application/json", }, });
    – Nikoloz
    Sep 3, 2021 at 20:12
  • signedOrders is an array consisting of 2 signed LimitOrders
    – Nikoloz
    Sep 3, 2021 at 20:14
  • The /sra/v4/orderbook endpoint is working for me. Please try pasting this code into your terminal: curl "https://api.0x.org/sra/v4/orderbook?quoteToken=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&baseToken=0x6b175474e89094c44da98b954eedeac495271d0f"
    – Megan
    Sep 7, 2021 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.