Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-10-29 10:44:29 +00:00
parent 4e64b77e47
commit eb73d115f2
212 changed files with 970 additions and 970 deletions

View File

@@ -4,33 +4,6 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Crypto/api](ht
Endpoints:
## News
Get news related to a currency
[https://m3o.com/crypto/api#News](https://m3o.com/crypto/api#News)
```go
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)
}
```
## Price
Get the last price for a given crypto ticker
@@ -45,7 +18,7 @@ import(
"fmt"
"os"
"github.com/go.m3o.com/crypto"
"go.m3o.com/crypto"
)
// Get the last price for a given crypto ticker
@@ -72,7 +45,7 @@ import(
"fmt"
"os"
"github.com/go.m3o.com/crypto"
"go.m3o.com/crypto"
)
// Get the last quote for a given crypto ticker
@@ -99,7 +72,7 @@ import(
"fmt"
"os"
"github.com/go.m3o.com/crypto"
"go.m3o.com/crypto"
)
// Returns the history for the previous close
@@ -112,3 +85,30 @@ func GetPreviousClose() {
fmt.Println(rsp, err)
}
```
## News
Get news related to a currency
[https://m3o.com/crypto/api#News](https://m3o.com/crypto/api#News)
```go
package example
import(
"fmt"
"os"
"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)
}
```