Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GTD (Good Till Date) to FutureTimeInForce Enum #452

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TsenkoTsenkov
Copy link

This PR adds the GTD case to the FutureTimeInForce enum. Prior to this change, using the Binance Futures Client resulted in a deserialization exception when encountering the 'GTD' time in force. The exception details are as follows:

[error] sttp.client3.DeserializationException: Failed to decode GTD: MoveRight,MoveRight,MoveRight,MoveRight,DownArray,DownField(timeInForce),DownArray,DownField(symbols)
[error] 	at sttp.client3.DeserializationException$.apply(ResponseAs.scala:229)
[error] 	at sttp.client3.ResponseAs$.deserializeWithError$$anonfun$1(ResponseAs.scala:201)
[error] 	at sttp.client3.ResponseAs$.deserializeRightWithError$$anonfun$1(ResponseAs.scala:180)
[error] 	at sttp.client3.MappedResponseAs.mapWithMetadata$$anonfun$1(ResponseAs.scala:91)
[error] 	at sttp.client3.internal.BodyFromResponseAs.doApply$$anonfun$2(BodyFromResponseAs.scala:24)
[error] 	at use @ BotApp$.run(BotApp.scala:33)
[error] 	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:162)
[error] 	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:162)
[error] 	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:162)
[error] 	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:162)
[error] 	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:162)
[error] 	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:162)
[error] 	at modify @ fs2.internal.Scope.close(Scope.scala:262)
[error] 	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:162)
[error] 	at rethrow$extension @ fs2.Compiler$Target.compile$$anonfun$1(Compiler.scala:156)
[error] 	at run$ @ BotApp$.run(BotApp.scala:12)
[error] 	at get @ fs2.internal.Scope.openScope(Scope.scala:281)
[error] 	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:162)
[error] 	at flatMap @ fs2.Pull$.goCloseScope$1$$anonfun$1$$anonfun$3(Pull.scala:1187)
[error] 	at update @ fs2.internal.Scope.releaseChildScope(Scope.scala:227)
[error] 	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:162)
[error] stack trace is suppressed; run last Compile / run for the full output
[error] (Compile / run) sttp.client3.DeserializationException: Failed to decode GTD: MoveRight,MoveRight,MoveRight,MoveRight,DownArray,DownField(timeInForce),DownArray,DownField(symbols)
Screenshot 2023-12-25 at 13 51 37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant