Bingex.Swap.CloseAllPositionsData (Bingex v0.1.7)

Parses and structures response data for closing all swap positions on BingX.

This module extracts and formats the list of successfully and unsuccessfully closed positions from API responses. It also provides a utility to embed the parsed data into a Bingex.API.Reply.

Summary

Types

t()

@type t() :: %Bingex.Swap.CloseAllPositionsData{
  failed: [binary()],
  succeeded: [binary()]
}

Functions

decode(arg1)

@spec decode(any()) :: {:ok, t()} | :error

embed_in_reply(reply)

@spec embed_in_reply(Bingex.API.Reply.t()) :: Bingex.API.Reply.t(t())