Code Monkey home page Code Monkey logo

starkex's Issues

create new order 签名错误???

2022/08/22 00:35:35 {NetworkId:3 PositionId:1 Market:ETH-USD Side:BUY HumanSize:0.1 HumanPrice:1500 LimitFee:0.01 ClientId:8141797145391901 Expiration:2022-08-21T16:40:35.548Z}
2022/08/22 00:35:35 https://api.stage.dydx.exchange/v3/orders
go-dydx 2022/08/22 00:35:36 uri: /v3/orders, code: 400, err msg: {"errors":[{"msg":"Invalid signature for order"}]}

Concurrent version of PedersenHash isn't working

Is this library still works? Could you please admit it? It looks like I didn't change anything in my code but it's not working any longer.

This is how I use it

	orderSignParam := starkex.OrderSignParam{
		NetworkId:  r.networkID, // 3
		PositionId: r.positionID, // got from getAccount()
		Market:     req.Market, // "ETH-USD"
		Side:       "BUY",
		HumanSize:  req.Size, // 1
		HumanPrice: req.Price, // 1
		LimitFee:   req.LimitFee, // "0.000000"
		ClientId:   req.ClientId, // "1" 
		Expiration: expiration,  // "2023-04-05T15:50:15.285Z"
	}

	signature, err := starkex.OrderSign(r.starkexCreds.PrivateKey, orderSignParam) // FIXME invaid signature
	if err != nil {
		return fmt.Errorf("starkex sing: %w", err)
	}
  • Not sure about req.ClientId, // "1" though
  • r.starkexCreds.PrivateKey is 100% right (checked about 5 times with local-storage on dydx website)

UPD: clientID if generated now, it wasn't the problem

I think you last commit where you've added concurrency to crypto stuff broke something. Rollback to the prev version fixed the problem

关于签名里面的问题

NetworkId: NETWORK_ID_MAINNET,
CreditAmount: "1",
DebitAmount: "2",
SenderPositionId: 12345, //这些参数是什么意思?
ReceiverPositionId: 67890,//这些参数是什么意思?
ReceiverPublicKey: "04a9ecd28a67407c3cff8937f329ca24fd631b1d9ca2b9f2df47c7ebf72bf0b0",//这些参数是什么意思?
ReceiverAddress: "0x1234567890123456789012345678901234567890",//这些参数是什么意思?
Expiration: "2020-09-17T04:15:55.028Z",
ClientId: "This is an ID that the client came up with to describe this transfer",

question about usage

Hi,is it posdible to have a go exsample to create order using your the dydx stark/signature on ropsten?

Add more support for additional markets.

Currently, the SYNTHETIC_ID_MAP and ASSET_RESOLUTION don't include a lot of the newly added markets on DYDX as shown in the v3-python implementation: https://github.com/dydxprotocol/dydx-v3-python/blob/dc7705ed51891c4901f26bfed9ca91a0e95ce1aa/dydx3/constants.py#L61

Please add support for all the markets as we cannot submit Orders because the signature fails on non-supported markets as outlined in the constants.go file
https://github.com/yanue/starkex/blob/master/const.go

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.