Class: Fcoin::EndPoint::MarketTask

Inherits:
Thor
  • Object
show all
Defined in:
lib/fcoin/cli/endpoint/market_task.rb

Instance Method Summary collapse

Instance Method Details

#candlesJSON

Returns candles info of symbol specified by resolution.

curl: GET api.fcoin.com/v2/market/candles/$resolution/$symbol

Examples:

get monthly(MN) ethusdt candles info.

./bin/fcoin market candles --symbol ethusdt --resolution D1

Parameters:

  • symbol (String or Symbol)

    Transaction pairs.

  • resolution (String or Symbol)

    period of candles chart. resolution must be included in [M1, M3, M5, M15, M30, H1, H4, H6, D1, W1, MN].

Returns:

  • (JSON)

    Returns candles info.

Raises:

  • (ArgumentError)

    If the symbol or resolution does not have.

  • (InvalidValueError)

    If symbol or resolution is invalid.

See Also:



82
# File 'lib/fcoin/cli/endpoint/market_task.rb', line 82

desc 'candles', 'Returns candles info of symbol specified by resolution'

#depthJSON

Returns depth info of symbol specified by level.

curl: GET api.fcoin.com/v2/market/depth/$level/$symbol

Examples:

get ethusdt depth info specified by L20 level.

./bin/fcoin market depth --symbol ethusdt --level L20

Parameters:

  • symbol (String)

    Transaction pairs.

  • level (String)

    Level of depth chart. level must be included in [L20, L40, full].

Returns:

  • (JSON)

    Returns depth info.

Raises:

  • (ArgumentError)

    If the symbol or level does not have.

  • (InvalidValueError)

    If symbol or level is invalid.

See Also:



40
# File 'lib/fcoin/cli/endpoint/market_task.rb', line 40

desc 'depth', 'Returns depth info of symbol specified by level'

#tickerJSON

Returns ticker info of symbol.

curl: GET api.fcoin.com/v2/market/ticker/$symbol

Examples:

get ethusdt ticker info

./bin/fcoin market ticker --symbol ethusdt

Parameters:

  • symbol (String)

    Transaction pairs.

Returns:

  • (JSON)

    Returns ticker info.

Raises:

  • (ArgumentError)

    If the symbol does not have.

See Also:



19
# File 'lib/fcoin/cli/endpoint/market_task.rb', line 19

desc 'ticker', 'Returns ticker info of symbol'

#tradesJSON

Returns trades info of symbol.

curl: GET api.fcoin.com/v2/market/trades/$symbol

Examples:

get ethusdt trades info.

./bin/fcoin market trades --symbol ethusdt

Parameters:

  • symbol (String)

    Transaction pairs.

Returns:

  • (JSON)

    Returns trades info.

Raises:

  • (ArgumentError)

    If the symbol does not have.

See Also:



61
# File 'lib/fcoin/cli/endpoint/market_task.rb', line 61

desc 'trades', 'Returns trades info of symbol'