mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-11 18:44:26 +00:00
18 lines
312 B
Go
Executable File
18 lines
312 B
Go
Executable File
package example
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/go.m3o.com/crypto"
|
|
)
|
|
|
|
// Get news related to a currency
|
|
func GetCryptocurrencyNews() {
|
|
cryptoService := crypto.NewCryptoService(os.Getenv("M3O_API_TOKEN"))
|
|
rsp, err := cryptoService.News(&crypto.NewsRequest{
|
|
Symbol: "BTCUSD",
|
|
})
|
|
fmt.Println(rsp, err)
|
|
}
|